﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Globalization;
using System.Data;
using System.Data.Common;
using System.Xml;
using System.Text;
using System.IO;
using LibHuman;


namespace Human
{
	/// <summary>
	/// Summary description for frmLyLichNVSua.
	/// </summary>
	public class frmLyLichNV : System.Windows.Forms.Form
	{
        private string TSo = "", sql = "", ma_vantay="",s_mmyy="";		
		DataSet dsllnv = new DataSet();
        DataSet ds_bophan = new DataSet();
		private byte[] image;
		private System.IO.MemoryStream memo;
		private System.IO.FileStream fstr;
		private Bitmap map;
        private AccessData mDB = new AccessData();
        Language lan = new Language();
        string m_user = "",ten_nd="",ngayht="";
		bool bVantay,bBarcode,bTheATM,admin=false;
        FrmNhanDang fnhandang; 
		DataSet ds =new DataSet();
		private DataSet dsxml =new DataSet();
		//private Print rpt=new Print();
		private string v_manv;
		private string picture;		
		private DataSet ds1=new DataSet();
		private System.Windows.Forms.TextBox txtMVTat;
		private System.Windows.Forms.Label label74;
		private System.Windows.Forms.TextBox cboCongDoan;
		private System.Windows.Forms.TextBox cboDoan;
		private System.Windows.Forms.TextBox cboChiBo;
		private System.Windows.Forms.TextBox cboDang;
        private System.Windows.Forms.ComboBox cboPhai;
        private MaskedBox.MaskedBox dtpNgayCongTac;
		private System.Windows.Forms.ComboBox cboBoPhan;
		private System.Windows.Forms.ComboBox cboChucVu;
		private System.Windows.Forms.Button butChonHinh;
		private System.Windows.Forms.TextBox txtDienThoai;
		private System.Windows.Forms.Label label26;
		private System.Windows.Forms.Label label25;
		private System.Windows.Forms.Label label24;
		private System.Windows.Forms.Label label23;
		private System.Windows.Forms.ComboBox cboChuyenMon;
		private System.Windows.Forms.ComboBox cboHocVan;
		private System.Windows.Forms.TextBox txtNoiCapCMND;
		private System.Windows.Forms.TextBox txtSoCMND;
		private System.Windows.Forms.ComboBox cboQuanOHN;
		private System.Windows.Forms.ComboBox cboQuanThuongTru;
		private System.Windows.Forms.ComboBox cboTinhOHN;
		private System.Windows.Forms.TextBox txtNoiOHN;
		private System.Windows.Forms.ComboBox cboTinhThuongTru;
		private System.Windows.Forms.TextBox txtThuongTru;
		private System.Windows.Forms.TextBox txtNoiSinh;
		private System.Windows.Forms.Label label22;
		private System.Windows.Forms.ComboBox cboNguyenQuan;
		private System.Windows.Forms.TextBox txtNguyenQuan;
		private System.Windows.Forms.Label label21;
		private System.Windows.Forms.ComboBox cboTonGiao;
		private System.Windows.Forms.Label label20;
		private System.Windows.Forms.ComboBox cboDanToc;
		private System.Windows.Forms.TextBox txtThuTu;
		private System.Windows.Forms.TextBox txtBiDanh;
		private System.Windows.Forms.TextBox txtTenNV;
		private System.Windows.Forms.TextBox txtHoNV;
		private System.Windows.Forms.TextBox txtChucVu;
		private System.Windows.Forms.TextBox txtMaBP;
		private System.Windows.Forms.Label label19;
		private System.Windows.Forms.Label label18;
		private System.Windows.Forms.Label label17;
		private System.Windows.Forms.Label label16;
		private System.Windows.Forms.Label label15;
		private System.Windows.Forms.Label label14;
		private System.Windows.Forms.Label label13;
        private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.PictureBox picNhanVien;
		private System.Windows.Forms.Button butTruoc;
		private System.Windows.Forms.Button butSau;
		private System.Windows.Forms.Button butThem;
		private System.Windows.Forms.Button butHuy;
		private System.Windows.Forms.Button butTim;
        private System.Windows.Forms.Button butXem;
		private System.Windows.Forms.Button butTiep;
		private System.Windows.Forms.Label label27;
		private System.Windows.Forms.TextBox txtTSo;
		private System.Windows.Forms.TextBox txtMaSoNV;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.CheckBox checkCT;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.CheckBox checkDT;
		private System.Windows.Forms.CheckBox checkHD;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.PictureBox pictureBox3;
		private System.Windows.Forms.PictureBox pictureBox4;
		private System.Windows.Forms.CheckBox checkGC;
		private System.Windows.Forms.PictureBox pictureBox5;
		private System.Windows.Forms.CheckBox checkNN;
		private System.Windows.Forms.PictureBox pictureBox6;
		private System.Windows.Forms.CheckBox checkCS;
		private System.Windows.Forms.PictureBox pictureBox7;
		private System.Windows.Forms.CheckBox checkSK;
		private System.Windows.Forms.PictureBox pictureBox8;
		private System.Windows.Forms.CheckBox checkDThe;
		private System.Windows.Forms.Label lblCT;
		private System.Windows.Forms.Label lblDT;
		private System.Windows.Forms.Label lblHD;
		private System.Windows.Forms.Label lblGC;
		private System.Windows.Forms.Label lblNN;
		private System.Windows.Forms.Label lblCS;
		private System.Windows.Forms.Label lblSK;
		private System.Windows.Forms.Label lblDThe;
		private System.Windows.Forms.PictureBox pictureBox2;
		private System.Windows.Forms.Label label29;
		private System.Windows.Forms.TextBox txtnamsinh;
		private System.Windows.Forms.ComboBox cboNgoaiNgu1;
		private System.Windows.Forms.ComboBox cboNgoaingu3;
		private System.Windows.Forms.Label label28;
		private System.Windows.Forms.ComboBox cboNgoaingu2;
		private System.Windows.Forms.Label label30;
		private System.Windows.Forms.Label label31;
		private System.Windows.Forms.Label label32;
		private System.Windows.Forms.TextBox txtCellphone;
		private System.Windows.Forms.ComboBox cboNgoaingu4;
		private System.Windows.Forms.Label label33;
		private System.Windows.Forms.Label label34;
		private System.Windows.Forms.Label label35;
		private System.Windows.Forms.TextBox txtTGBN;
		private System.Windows.Forms.ComboBox cboChucdanh;
        private System.Windows.Forms.ToolTip toolTip1;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.TabPage tabPage2;
		private System.Windows.Forms.TabControl tabllnv;
        private System.Windows.Forms.DataGrid dataGrid1;
        private MaskedTextBox txtNgayBN;
        private MaskedTextBox dtpNgaySinh;
        private PictureBox pBarcode;
        private Button butCancel;
        private Panel panel6;
        private Button butKetThuc;
        private ToolStrip toolStrip3;
        private ToolStripLabel toolStripLabel3;
        private ToolStrip toolStrip2;
        private ToolStripButton tmn_congtac;
        private ToolStripSeparator toolStripSeparator7;
        private ToolStripButton tmn_daotao;
        private ToolStripSeparator toolStripSeparator4;
        private ToolStripButton tmn_hopdong;
        private ToolStripSeparator toolStripSeparator8;
        private ToolStripButton tmn_giacanh;
        private ToolStripSeparator toolStripSeparator6;
        private ToolStripButton tmn_nuocngoai;
        private ToolStripSeparator toolStripSeparator1;
        private ToolStripButton tmn_capso;
        private ToolStripSeparator toolStripSeparator2;
        private ToolStripButton tmn_suckhoe;
        private ToolStripSeparator toolStripSeparator3;
        private ToolStripButton tmn_doanthe;
        private ToolStripSeparator toolStripSeparator5;
        private Label label36;
        private ComboBox ngoaingu2;
        private Label label37;
        private ComboBox vitinh;
        private Label label38;
        private ComboBox cboChinhtri;
        private GroupBox groupBox2;
        private Label label39;
        private TextBox txtSotk;
        private Label label40;
        private ImageList ilsIcons32;
        private Panel panel8;
        private TextBox txtTimnhanh;
        private Label label42;
        private ComboBox cbpBP_loc;
        private Label label41;
        private PictureBox ptb;
        private Label finger;
        private Label lblvantay;
        private Button butEdit;
        private Label label43;
        private ComboBox txtNganhang;
        private TextBox txt_masothue;
        private Label label44;
        private TextBox txtipmay;
        private Label lbipmay;
        private AxBARCODELib.AxBarcode barcode;
        private PrintPreviewDialog printPreviewDialog1;
        private TextBox txt_macc;
        private Label lbl_macc;
        private MaskedTextBox dtpNgayCapCMND;
		public frmLyLichNV(bool m_admin,string tennd)
		{			
			InitializeComponent();
            lan.Read_Language_to_Xml(this.Name.ToString(), this);
            lan.Changelanguage_to_English(this.Name.ToString(), this);
            admin = m_admin;
            ten_nd = tennd;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmLyLichNV));
            this.txtMVTat = new System.Windows.Forms.TextBox();
            this.label74 = new System.Windows.Forms.Label();
            this.cboCongDoan = new System.Windows.Forms.TextBox();
            this.cboDoan = new System.Windows.Forms.TextBox();
            this.cboChiBo = new System.Windows.Forms.TextBox();
            this.cboDang = new System.Windows.Forms.TextBox();
            this.cboPhai = new System.Windows.Forms.ComboBox();
            this.dtpNgayCongTac = new MaskedBox.MaskedBox();
            this.cboBoPhan = new System.Windows.Forms.ComboBox();
            this.cboChucVu = new System.Windows.Forms.ComboBox();
            this.txtDienThoai = new System.Windows.Forms.TextBox();
            this.label26 = new System.Windows.Forms.Label();
            this.label25 = new System.Windows.Forms.Label();
            this.label24 = new System.Windows.Forms.Label();
            this.label23 = new System.Windows.Forms.Label();
            this.cboChuyenMon = new System.Windows.Forms.ComboBox();
            this.cboNgoaiNgu1 = new System.Windows.Forms.ComboBox();
            this.cboHocVan = new System.Windows.Forms.ComboBox();
            this.txtNoiCapCMND = new System.Windows.Forms.TextBox();
            this.txtSoCMND = new System.Windows.Forms.TextBox();
            this.cboQuanOHN = new System.Windows.Forms.ComboBox();
            this.cboQuanThuongTru = new System.Windows.Forms.ComboBox();
            this.cboTinhOHN = new System.Windows.Forms.ComboBox();
            this.txtNoiOHN = new System.Windows.Forms.TextBox();
            this.cboTinhThuongTru = new System.Windows.Forms.ComboBox();
            this.txtThuongTru = new System.Windows.Forms.TextBox();
            this.txtNoiSinh = new System.Windows.Forms.TextBox();
            this.label22 = new System.Windows.Forms.Label();
            this.cboNguyenQuan = new System.Windows.Forms.ComboBox();
            this.txtNguyenQuan = new System.Windows.Forms.TextBox();
            this.label21 = new System.Windows.Forms.Label();
            this.cboTonGiao = new System.Windows.Forms.ComboBox();
            this.label20 = new System.Windows.Forms.Label();
            this.cboDanToc = new System.Windows.Forms.ComboBox();
            this.txtThuTu = new System.Windows.Forms.TextBox();
            this.txtBiDanh = new System.Windows.Forms.TextBox();
            this.txtTenNV = new System.Windows.Forms.TextBox();
            this.txtHoNV = new System.Windows.Forms.TextBox();
            this.txtChucVu = new System.Windows.Forms.TextBox();
            this.txtMaBP = new System.Windows.Forms.TextBox();
            this.label19 = new System.Windows.Forms.Label();
            this.label18 = new System.Windows.Forms.Label();
            this.label17 = new System.Windows.Forms.Label();
            this.label16 = new System.Windows.Forms.Label();
            this.label15 = new System.Windows.Forms.Label();
            this.label14 = new System.Windows.Forms.Label();
            this.label13 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.label9 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.label27 = new System.Windows.Forms.Label();
            this.txtTSo = new System.Windows.Forms.TextBox();
            this.txtMaSoNV = new System.Windows.Forms.TextBox();
            this.label12 = new System.Windows.Forms.Label();
            this.lblCT = new System.Windows.Forms.Label();
            this.checkCT = new System.Windows.Forms.CheckBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.pictureBox8 = new System.Windows.Forms.PictureBox();
            this.checkDThe = new System.Windows.Forms.CheckBox();
            this.lblDThe = new System.Windows.Forms.Label();
            this.pictureBox7 = new System.Windows.Forms.PictureBox();
            this.checkSK = new System.Windows.Forms.CheckBox();
            this.lblSK = new System.Windows.Forms.Label();
            this.pictureBox6 = new System.Windows.Forms.PictureBox();
            this.checkCS = new System.Windows.Forms.CheckBox();
            this.lblCS = new System.Windows.Forms.Label();
            this.pictureBox5 = new System.Windows.Forms.PictureBox();
            this.checkNN = new System.Windows.Forms.CheckBox();
            this.lblNN = new System.Windows.Forms.Label();
            this.pictureBox4 = new System.Windows.Forms.PictureBox();
            this.checkGC = new System.Windows.Forms.CheckBox();
            this.lblGC = new System.Windows.Forms.Label();
            this.pictureBox3 = new System.Windows.Forms.PictureBox();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.checkHD = new System.Windows.Forms.CheckBox();
            this.lblHD = new System.Windows.Forms.Label();
            this.checkDT = new System.Windows.Forms.CheckBox();
            this.lblDT = new System.Windows.Forms.Label();
            this.label29 = new System.Windows.Forms.Label();
            this.txtnamsinh = new System.Windows.Forms.TextBox();
            this.cboNgoaingu3 = new System.Windows.Forms.ComboBox();
            this.label28 = new System.Windows.Forms.Label();
            this.cboNgoaingu2 = new System.Windows.Forms.ComboBox();
            this.label30 = new System.Windows.Forms.Label();
            this.label31 = new System.Windows.Forms.Label();
            this.label32 = new System.Windows.Forms.Label();
            this.txtCellphone = new System.Windows.Forms.TextBox();
            this.cboNgoaingu4 = new System.Windows.Forms.ComboBox();
            this.label33 = new System.Windows.Forms.Label();
            this.label34 = new System.Windows.Forms.Label();
            this.label35 = new System.Windows.Forms.Label();
            this.txtTGBN = new System.Windows.Forms.TextBox();
            this.cboChucdanh = new System.Windows.Forms.ComboBox();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.txtSotk = new System.Windows.Forms.TextBox();
            this.butChonHinh = new System.Windows.Forms.Button();
            this.butEdit = new System.Windows.Forms.Button();
            this.butXem = new System.Windows.Forms.Button();
            this.butTim = new System.Windows.Forms.Button();
            this.butCancel = new System.Windows.Forms.Button();
            this.butTruoc = new System.Windows.Forms.Button();
            this.butThem = new System.Windows.Forms.Button();
            this.butHuy = new System.Windows.Forms.Button();
            this.butTiep = new System.Windows.Forms.Button();
            this.butSau = new System.Windows.Forms.Button();
            this.butKetThuc = new System.Windows.Forms.Button();
            this.tabllnv = new System.Windows.Forms.TabControl();
            this.tabPage1 = new System.Windows.Forms.TabPage();
            this.txt_macc = new System.Windows.Forms.TextBox();
            this.txtNganhang = new System.Windows.Forms.ComboBox();
            this.label39 = new System.Windows.Forms.Label();
            this.label43 = new System.Windows.Forms.Label();
            this.txtipmay = new System.Windows.Forms.TextBox();
            this.txt_masothue = new System.Windows.Forms.TextBox();
            this.lblvantay = new System.Windows.Forms.Label();
            this.lbipmay = new System.Windows.Forms.Label();
            this.finger = new System.Windows.Forms.Label();
            this.label44 = new System.Windows.Forms.Label();
            this.ptb = new System.Windows.Forms.PictureBox();
            this.label40 = new System.Windows.Forms.Label();
            this.lbl_macc = new System.Windows.Forms.Label();
            this.label41 = new System.Windows.Forms.Label();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.picNhanVien = new System.Windows.Forms.PictureBox();
            this.cboChinhtri = new System.Windows.Forms.ComboBox();
            this.label38 = new System.Windows.Forms.Label();
            this.label37 = new System.Windows.Forms.Label();
            this.vitinh = new System.Windows.Forms.ComboBox();
            this.label36 = new System.Windows.Forms.Label();
            this.ngoaingu2 = new System.Windows.Forms.ComboBox();
            this.dtpNgayCapCMND = new System.Windows.Forms.MaskedTextBox();
            this.dtpNgaySinh = new System.Windows.Forms.MaskedTextBox();
            this.txtNgayBN = new System.Windows.Forms.MaskedTextBox();
            this.tabPage2 = new System.Windows.Forms.TabPage();
            this.dataGrid1 = new System.Windows.Forms.DataGrid();
            this.panel8 = new System.Windows.Forms.Panel();
            this.cbpBP_loc = new System.Windows.Forms.ComboBox();
            this.txtTimnhanh = new System.Windows.Forms.TextBox();
            this.label42 = new System.Windows.Forms.Label();
            this.ilsIcons32 = new System.Windows.Forms.ImageList(this.components);
            this.panel6 = new System.Windows.Forms.Panel();
            this.toolStrip3 = new System.Windows.Forms.ToolStrip();
            this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
            this.toolStrip2 = new System.Windows.Forms.ToolStrip();
            this.tmn_congtac = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_daotao = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_hopdong = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_giacanh = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_nuocngoai = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_capso = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_suckhoe = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
            this.tmn_doanthe = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
            this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
            this.pBarcode = new System.Windows.Forms.PictureBox();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.tabllnv.SuspendLayout();
            this.tabPage1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ptb)).BeginInit();
            this.groupBox2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.picNhanVien)).BeginInit();
            this.tabPage2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
            this.panel8.SuspendLayout();
            this.panel6.SuspendLayout();
            this.toolStrip3.SuspendLayout();
            this.toolStrip2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pBarcode)).BeginInit();
            this.SuspendLayout();
            // 
            // txtMVTat
            // 
            this.txtMVTat.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtMVTat.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMVTat.Enabled = false;
            this.txtMVTat.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtMVTat.ForeColor = System.Drawing.Color.Navy;
            this.txtMVTat.Location = new System.Drawing.Point(574, 79);
            this.txtMVTat.MaxLength = 10;
            this.txtMVTat.Name = "txtMVTat";
            this.txtMVTat.Size = new System.Drawing.Size(101, 22);
            this.txtMVTat.TabIndex = 9;
            this.toolTip1.SetToolTip(this.txtMVTat, "Nhập tên viết tắt");
            this.txtMVTat.WordWrap = false;
            this.txtMVTat.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMVTat_KeyDown);
            this.txtMVTat.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtMVTat_KeyPress);
            // 
            // label74
            // 
            this.label74.ForeColor = System.Drawing.Color.Navy;
            this.label74.Location = new System.Drawing.Point(509, 83);
            this.label74.Name = "label74";
            this.label74.Size = new System.Drawing.Size(64, 13);
            this.label74.TabIndex = 49;
            this.label74.Text = "Tên viết tắt:";
            this.label74.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cboCongDoan
            // 
            this.cboCongDoan.BackColor = System.Drawing.Color.White;
            this.cboCongDoan.Enabled = false;
            this.cboCongDoan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboCongDoan.ForeColor = System.Drawing.Color.Navy;
            this.cboCongDoan.Location = new System.Drawing.Point(503, 354);
            this.cboCongDoan.MaxLength = 1;
            this.cboCongDoan.Name = "cboCongDoan";
            this.cboCongDoan.Size = new System.Drawing.Size(34, 22);
            this.cboCongDoan.TabIndex = 39;
            this.cboCongDoan.WordWrap = false;
            this.cboCongDoan.Validated += new System.EventHandler(this.cboCongDoan_Validated);
            this.cboCongDoan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboCongDoan_KeyDown);
            this.cboCongDoan.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cboCongDoan_KeyPress);
            // 
            // cboDoan
            // 
            this.cboDoan.BackColor = System.Drawing.Color.White;
            this.cboDoan.Enabled = false;
            this.cboDoan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboDoan.ForeColor = System.Drawing.Color.Navy;
            this.cboDoan.Location = new System.Drawing.Point(385, 354);
            this.cboDoan.MaxLength = 1;
            this.cboDoan.Name = "cboDoan";
            this.cboDoan.Size = new System.Drawing.Size(37, 22);
            this.cboDoan.TabIndex = 38;
            this.cboDoan.WordWrap = false;
            this.cboDoan.Validated += new System.EventHandler(this.cboDoan_Validated);
            this.cboDoan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboDoan_KeyDown);
            this.cboDoan.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cboDoan_KeyPress);
            // 
            // cboChiBo
            // 
            this.cboChiBo.BackColor = System.Drawing.Color.White;
            this.cboChiBo.Enabled = false;
            this.cboChiBo.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboChiBo.ForeColor = System.Drawing.Color.Navy;
            this.cboChiBo.Location = new System.Drawing.Point(203, 355);
            this.cboChiBo.MaxLength = 2;
            this.cboChiBo.Name = "cboChiBo";
            this.cboChiBo.Size = new System.Drawing.Size(100, 22);
            this.cboChiBo.TabIndex = 37;
            this.cboChiBo.WordWrap = false;
            this.cboChiBo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboChiBo_KeyDown);
            this.cboChiBo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cboChiBo_KeyPress);
            // 
            // cboDang
            // 
            this.cboDang.BackColor = System.Drawing.Color.White;
            this.cboDang.Enabled = false;
            this.cboDang.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboDang.ForeColor = System.Drawing.Color.Navy;
            this.cboDang.Location = new System.Drawing.Point(114, 354);
            this.cboDang.MaxLength = 1;
            this.cboDang.Name = "cboDang";
            this.cboDang.Size = new System.Drawing.Size(36, 22);
            this.cboDang.TabIndex = 36;
            this.cboDang.WordWrap = false;
            this.cboDang.Validated += new System.EventHandler(this.cboDang_Validated);
            this.cboDang.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboDang_KeyDown);
            this.cboDang.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cboDang_KeyPress);
            // 
            // cboPhai
            // 
            this.cboPhai.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboPhai.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboPhai.Enabled = false;
            this.cboPhai.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboPhai.ForeColor = System.Drawing.Color.Navy;
            this.cboPhai.Location = new System.Drawing.Point(329, 104);
            this.cboPhai.Name = "cboPhai";
            this.cboPhai.Size = new System.Drawing.Size(88, 22);
            this.cboPhai.TabIndex = 11;
            this.toolTip1.SetToolTip(this.cboPhai, "Chọn phái");
            this.cboPhai.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboPhai_KeyDown);
            // 
            // dtpNgayCongTac
            // 
            this.dtpNgayCongTac.BackColor = System.Drawing.Color.White;
            this.dtpNgayCongTac.Enabled = false;
            this.dtpNgayCongTac.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dtpNgayCongTac.ForeColor = System.Drawing.Color.Navy;
            this.dtpNgayCongTac.Location = new System.Drawing.Point(115, 354);
            this.dtpNgayCongTac.Mask = "##/##/####";
            this.dtpNgayCongTac.Name = "dtpNgayCongTac";
            this.dtpNgayCongTac.Size = new System.Drawing.Size(104, 23);
            this.dtpNgayCongTac.TabIndex = 35;
            this.dtpNgayCongTac.Text = "__/__/____";
            this.dtpNgayCongTac.Validated += new System.EventHandler(this.dtpNgayCongTac_Validated);
            this.dtpNgayCongTac.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dtpNgayCongTac_KeyDown);
            // 
            // cboBoPhan
            // 
            this.cboBoPhan.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboBoPhan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboBoPhan.DropDownWidth = 240;
            this.cboBoPhan.Enabled = false;
            this.cboBoPhan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboBoPhan.ForeColor = System.Drawing.Color.Navy;
            this.cboBoPhan.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.cboBoPhan.ItemHeight = 14;
            this.cboBoPhan.Location = new System.Drawing.Point(313, 4);
            this.cboBoPhan.Name = "cboBoPhan";
            this.cboBoPhan.Size = new System.Drawing.Size(362, 22);
            this.cboBoPhan.TabIndex = 2;
            this.cboBoPhan.Tag = "";
            this.toolTip1.SetToolTip(this.cboBoPhan, "Chọn tên bộ phận");
            this.cboBoPhan.SelectedIndexChanged += new System.EventHandler(this.cboBoPhan_SelectedIndexChanged);
            this.cboBoPhan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboBoPhan_KeyDown);
            // 
            // cboChucVu
            // 
            this.cboChucVu.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboChucVu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboChucVu.Enabled = false;
            this.cboChucVu.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboChucVu.ForeColor = System.Drawing.Color.Navy;
            this.cboChucVu.Location = new System.Drawing.Point(191, 29);
            this.cboChucVu.Name = "cboChucVu";
            this.cboChucVu.Size = new System.Drawing.Size(484, 22);
            this.cboChucVu.TabIndex = 4;
            this.toolTip1.SetToolTip(this.cboChucVu, "Chọn tên chức vụ");
            this.cboChucVu.SelectedIndexChanged += new System.EventHandler(this.cboChucVu_SelectedIndexChanged);
            this.cboChucVu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboChucVu_KeyDown);
            // 
            // txtDienThoai
            // 
            this.txtDienThoai.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtDienThoai.Enabled = false;
            this.txtDienThoai.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtDienThoai.ForeColor = System.Drawing.Color.Navy;
            this.txtDienThoai.Location = new System.Drawing.Point(115, 254);
            this.txtDienThoai.MaxLength = 15;
            this.txtDienThoai.Name = "txtDienThoai";
            this.txtDienThoai.Size = new System.Drawing.Size(197, 22);
            this.txtDienThoai.TabIndex = 26;
            this.toolTip1.SetToolTip(this.txtDienThoai, "Nhập số điện thoại");
            this.txtDienThoai.WordWrap = false;
            this.txtDienThoai.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDienThoai_KeyDown);
            this.txtDienThoai.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtDienThoai_KeyPress);
            // 
            // label26
            // 
            this.label26.ForeColor = System.Drawing.Color.Navy;
            this.label26.Location = new System.Drawing.Point(428, 358);
            this.label26.Name = "label26";
            this.label26.Size = new System.Drawing.Size(63, 13);
            this.label26.TabIndex = 79;
            this.label26.Text = "Công đoàn:";
            this.label26.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label25
            // 
            this.label25.ForeColor = System.Drawing.Color.Navy;
            this.label25.Location = new System.Drawing.Point(346, 358);
            this.label25.Name = "label25";
            this.label25.Size = new System.Drawing.Size(36, 13);
            this.label25.TabIndex = 78;
            this.label25.Text = "Đoàn:";
            this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label24
            // 
            this.label24.ForeColor = System.Drawing.Color.Navy;
            this.label24.Location = new System.Drawing.Point(155, 358);
            this.label24.Name = "label24";
            this.label24.Size = new System.Drawing.Size(40, 13);
            this.label24.TabIndex = 77;
            this.label24.Text = "Chi bộ:";
            this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label23
            // 
            this.label23.ForeColor = System.Drawing.Color.Navy;
            this.label23.Location = new System.Drawing.Point(77, 359);
            this.label23.Name = "label23";
            this.label23.Size = new System.Drawing.Size(36, 13);
            this.label23.TabIndex = 76;
            this.label23.Text = "Đảng:";
            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cboChuyenMon
            // 
            this.cboChuyenMon.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboChuyenMon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboChuyenMon.Enabled = false;
            this.cboChuyenMon.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboChuyenMon.ForeColor = System.Drawing.Color.Navy;
            this.cboChuyenMon.Location = new System.Drawing.Point(385, 304);
            this.cboChuyenMon.Name = "cboChuyenMon";
            this.cboChuyenMon.Size = new System.Drawing.Size(154, 22);
            this.cboChuyenMon.TabIndex = 32;
            this.cboChuyenMon.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboChuyenMon_KeyDown);
            // 
            // cboNgoaiNgu1
            // 
            this.cboNgoaiNgu1.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboNgoaiNgu1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboNgoaiNgu1.Enabled = false;
            this.cboNgoaiNgu1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboNgoaiNgu1.ForeColor = System.Drawing.Color.Navy;
            this.cboNgoaiNgu1.Location = new System.Drawing.Point(385, 329);
            this.cboNgoaiNgu1.Name = "cboNgoaiNgu1";
            this.cboNgoaiNgu1.Size = new System.Drawing.Size(154, 22);
            this.cboNgoaiNgu1.TabIndex = 34;
            this.cboNgoaiNgu1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboNgoaiNgu_KeyDown);
            // 
            // cboHocVan
            // 
            this.cboHocVan.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboHocVan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboHocVan.Enabled = false;
            this.cboHocVan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboHocVan.ForeColor = System.Drawing.Color.Navy;
            this.cboHocVan.Location = new System.Drawing.Point(115, 329);
            this.cboHocVan.Name = "cboHocVan";
            this.cboHocVan.Size = new System.Drawing.Size(188, 22);
            this.cboHocVan.TabIndex = 33;
            this.cboHocVan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboHocVan_KeyDown);
            // 
            // txtNoiCapCMND
            // 
            this.txtNoiCapCMND.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtNoiCapCMND.Enabled = false;
            this.txtNoiCapCMND.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtNoiCapCMND.ForeColor = System.Drawing.Color.Navy;
            this.txtNoiCapCMND.Location = new System.Drawing.Point(250, 279);
            this.txtNoiCapCMND.MaxLength = 30;
            this.txtNoiCapCMND.Name = "txtNoiCapCMND";
            this.txtNoiCapCMND.Size = new System.Drawing.Size(112, 22);
            this.txtNoiCapCMND.TabIndex = 29;
            this.toolTip1.SetToolTip(this.txtNoiCapCMND, "Nhập nơi cấp CMND");
            this.txtNoiCapCMND.WordWrap = false;
            this.txtNoiCapCMND.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNoiCapCMND_KeyDown);
            this.txtNoiCapCMND.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtNoiCapCMND_KeyPress);
            this.txtNoiCapCMND.Validating += new System.ComponentModel.CancelEventHandler(this.txtNoiCapCMND_Validating);
            // 
            // txtSoCMND
            // 
            this.txtSoCMND.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtSoCMND.Enabled = false;
            this.txtSoCMND.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtSoCMND.ForeColor = System.Drawing.Color.Navy;
            this.txtSoCMND.Location = new System.Drawing.Point(115, 279);
            this.txtSoCMND.MaxLength = 9;
            this.txtSoCMND.Name = "txtSoCMND";
            this.txtSoCMND.Size = new System.Drawing.Size(80, 22);
            this.txtSoCMND.TabIndex = 28;
            this.toolTip1.SetToolTip(this.txtSoCMND, "Nhập số chứng minh nhân dân");
            this.txtSoCMND.WordWrap = false;
            this.txtSoCMND.Validated += new System.EventHandler(this.txtSoCMND_Validated);
            this.txtSoCMND.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSoCMND_KeyDown);
            this.txtSoCMND.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSoCMND_KeyPress);
            this.txtSoCMND.Validating += new System.ComponentModel.CancelEventHandler(this.txtSoCMND_Validating);
            // 
            // cboQuanOHN
            // 
            this.cboQuanOHN.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboQuanOHN.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboQuanOHN.Enabled = false;
            this.cboQuanOHN.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboQuanOHN.ForeColor = System.Drawing.Color.Navy;
            this.cboQuanOHN.Location = new System.Drawing.Point(544, 229);
            this.cboQuanOHN.Name = "cboQuanOHN";
            this.cboQuanOHN.Size = new System.Drawing.Size(129, 22);
            this.cboQuanOHN.TabIndex = 25;
            this.toolTip1.SetToolTip(this.cboQuanOHN, "Chọn quận, huyện ở hiện nay");
            this.cboQuanOHN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboQuanOHN_KeyDown);
            // 
            // cboQuanThuongTru
            // 
            this.cboQuanThuongTru.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboQuanThuongTru.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboQuanThuongTru.Enabled = false;
            this.cboQuanThuongTru.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboQuanThuongTru.ForeColor = System.Drawing.Color.Navy;
            this.cboQuanThuongTru.Location = new System.Drawing.Point(544, 204);
            this.cboQuanThuongTru.Name = "cboQuanThuongTru";
            this.cboQuanThuongTru.Size = new System.Drawing.Size(129, 22);
            this.cboQuanThuongTru.TabIndex = 22;
            this.toolTip1.SetToolTip(this.cboQuanThuongTru, "Chọn quận, huyện thường trú");
            this.cboQuanThuongTru.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboQuanThuongTru_KeyDown);
            // 
            // cboTinhOHN
            // 
            this.cboTinhOHN.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboTinhOHN.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboTinhOHN.Enabled = false;
            this.cboTinhOHN.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboTinhOHN.ForeColor = System.Drawing.Color.Navy;
            this.cboTinhOHN.Location = new System.Drawing.Point(431, 229);
            this.cboTinhOHN.Name = "cboTinhOHN";
            this.cboTinhOHN.Size = new System.Drawing.Size(108, 22);
            this.cboTinhOHN.TabIndex = 24;
            this.toolTip1.SetToolTip(this.cboTinhOHN, "Chọn tỉnh ở hiện nay ");
            this.cboTinhOHN.SelectionChangeCommitted += new System.EventHandler(this.cboTinhOHN_SelectionChangeCommitted);
            this.cboTinhOHN.SelectedIndexChanged += new System.EventHandler(this.cboTinhOHN_SelectedIndexChanged);
            this.cboTinhOHN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboTinhOHN_KeyDown);
            // 
            // txtNoiOHN
            // 
            this.txtNoiOHN.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtNoiOHN.Enabled = false;
            this.txtNoiOHN.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtNoiOHN.ForeColor = System.Drawing.Color.Navy;
            this.txtNoiOHN.Location = new System.Drawing.Point(115, 229);
            this.txtNoiOHN.MaxLength = 60;
            this.txtNoiOHN.Name = "txtNoiOHN";
            this.txtNoiOHN.Size = new System.Drawing.Size(310, 22);
            this.txtNoiOHN.TabIndex = 23;
            this.toolTip1.SetToolTip(this.txtNoiOHN, "Nhập chỗ ở hiện nay");
            this.txtNoiOHN.WordWrap = false;
            this.txtNoiOHN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNoiOHN_KeyDown);
            this.txtNoiOHN.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtNoiOHN_KeyPress);
            this.txtNoiOHN.Validating += new System.ComponentModel.CancelEventHandler(this.txtNoiOHN_Validating);
            // 
            // cboTinhThuongTru
            // 
            this.cboTinhThuongTru.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboTinhThuongTru.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboTinhThuongTru.Enabled = false;
            this.cboTinhThuongTru.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboTinhThuongTru.ForeColor = System.Drawing.Color.Navy;
            this.cboTinhThuongTru.Location = new System.Drawing.Point(431, 204);
            this.cboTinhThuongTru.Name = "cboTinhThuongTru";
            this.cboTinhThuongTru.Size = new System.Drawing.Size(108, 22);
            this.cboTinhThuongTru.TabIndex = 21;
            this.toolTip1.SetToolTip(this.cboTinhThuongTru, "Chọn tỉnh, thành phố thường trú");
            this.cboTinhThuongTru.SelectionChangeCommitted += new System.EventHandler(this.cboTinhThuongTru_SelectionChangeCommitted);
            this.cboTinhThuongTru.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboTinhThuongTru_KeyDown);
            // 
            // txtThuongTru
            // 
            this.txtThuongTru.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtThuongTru.Enabled = false;
            this.txtThuongTru.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtThuongTru.ForeColor = System.Drawing.Color.Navy;
            this.txtThuongTru.Location = new System.Drawing.Point(115, 204);
            this.txtThuongTru.MaxLength = 60;
            this.txtThuongTru.Name = "txtThuongTru";
            this.txtThuongTru.Size = new System.Drawing.Size(310, 22);
            this.txtThuongTru.TabIndex = 20;
            this.toolTip1.SetToolTip(this.txtThuongTru, "Nhập số nhà, đường, phường");
            this.txtThuongTru.WordWrap = false;
            this.txtThuongTru.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtThuongTru_KeyDown);
            this.txtThuongTru.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtThuongTru_KeyPress);
            // 
            // txtNoiSinh
            // 
            this.txtNoiSinh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtNoiSinh.Enabled = false;
            this.txtNoiSinh.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtNoiSinh.ForeColor = System.Drawing.Color.Navy;
            this.txtNoiSinh.Location = new System.Drawing.Point(115, 179);
            this.txtNoiSinh.MaxLength = 50;
            this.txtNoiSinh.Name = "txtNoiSinh";
            this.txtNoiSinh.Size = new System.Drawing.Size(560, 22);
            this.txtNoiSinh.TabIndex = 19;
            this.toolTip1.SetToolTip(this.txtNoiSinh, "Nhập nơi sinh");
            this.txtNoiSinh.WordWrap = false;
            this.txtNoiSinh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNoiSinh_KeyDown);
            this.txtNoiSinh.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtNoiSinh_KeyPress);
            // 
            // label22
            // 
            this.label22.ForeColor = System.Drawing.Color.DarkBlue;
            this.label22.Location = new System.Drawing.Point(65, 183);
            this.label22.Name = "label22";
            this.label22.Size = new System.Drawing.Size(48, 13);
            this.label22.TabIndex = 58;
            this.label22.Text = "Nơi sinh:";
            this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cboNguyenQuan
            // 
            this.cboNguyenQuan.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboNguyenQuan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboNguyenQuan.Enabled = false;
            this.cboNguyenQuan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboNguyenQuan.ForeColor = System.Drawing.Color.Navy;
            this.cboNguyenQuan.Location = new System.Drawing.Point(431, 154);
            this.cboNguyenQuan.Name = "cboNguyenQuan";
            this.cboNguyenQuan.Size = new System.Drawing.Size(243, 22);
            this.cboNguyenQuan.TabIndex = 18;
            this.toolTip1.SetToolTip(this.cboNguyenQuan, "Chọn quốc tịch");
            this.cboNguyenQuan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboNguyenQuan_KeyDown);
            // 
            // txtNguyenQuan
            // 
            this.txtNguyenQuan.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtNguyenQuan.Enabled = false;
            this.txtNguyenQuan.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtNguyenQuan.ForeColor = System.Drawing.Color.Navy;
            this.txtNguyenQuan.Location = new System.Drawing.Point(115, 154);
            this.txtNguyenQuan.MaxLength = 50;
            this.txtNguyenQuan.Name = "txtNguyenQuan";
            this.txtNguyenQuan.Size = new System.Drawing.Size(310, 22);
            this.txtNguyenQuan.TabIndex = 17;
            this.toolTip1.SetToolTip(this.txtNguyenQuan, "Nhập vào nguyên quán");
            this.txtNguyenQuan.WordWrap = false;
            this.txtNguyenQuan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNguyenQuan_KeyDown);
            this.txtNguyenQuan.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtNguyenQuan_KeyPress);
            this.txtNguyenQuan.Validating += new System.ComponentModel.CancelEventHandler(this.txtNguyenQuan_Validating);
            // 
            // label21
            // 
            this.label21.ForeColor = System.Drawing.Color.Navy;
            this.label21.Location = new System.Drawing.Point(419, 134);
            this.label21.Name = "label21";
            this.label21.Size = new System.Drawing.Size(57, 13);
            this.label21.TabIndex = 55;
            this.label21.Text = "Ngày sinh:";
            this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cboTonGiao
            // 
            this.cboTonGiao.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboTonGiao.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboTonGiao.Enabled = false;
            this.cboTonGiao.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboTonGiao.ForeColor = System.Drawing.Color.Navy;
            this.cboTonGiao.Location = new System.Drawing.Point(329, 129);
            this.cboTonGiao.Name = "cboTonGiao";
            this.cboTonGiao.Size = new System.Drawing.Size(88, 22);
            this.cboTonGiao.TabIndex = 14;
            this.toolTip1.SetToolTip(this.cboTonGiao, "Chọn tôn giáo");
            this.cboTonGiao.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboTonGiao_KeyDown);
            // 
            // label20
            // 
            this.label20.ForeColor = System.Drawing.Color.Navy;
            this.label20.Location = new System.Drawing.Point(275, 133);
            this.label20.Name = "label20";
            this.label20.Size = new System.Drawing.Size(52, 13);
            this.label20.TabIndex = 54;
            this.label20.Text = "Tôn giáo:";
            this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cboDanToc
            // 
            this.cboDanToc.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboDanToc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboDanToc.Enabled = false;
            this.cboDanToc.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboDanToc.ForeColor = System.Drawing.Color.Navy;
            this.cboDanToc.Location = new System.Drawing.Point(115, 129);
            this.cboDanToc.Name = "cboDanToc";
            this.cboDanToc.Size = new System.Drawing.Size(153, 22);
            this.cboDanToc.TabIndex = 13;
            this.toolTip1.SetToolTip(this.cboDanToc, "Chọn dân tộc");
            this.cboDanToc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboDanToc_KeyDown);
            // 
            // txtThuTu
            // 
            this.txtThuTu.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtThuTu.Enabled = false;
            this.txtThuTu.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtThuTu.ForeColor = System.Drawing.Color.Navy;
            this.txtThuTu.Location = new System.Drawing.Point(574, 104);
            this.txtThuTu.MaxLength = 5;
            this.txtThuTu.Name = "txtThuTu";
            this.txtThuTu.Size = new System.Drawing.Size(101, 22);
            this.txtThuTu.TabIndex = 12;
            this.txtThuTu.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtThuTu.WordWrap = false;
            this.txtThuTu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtThuTu_KeyDown);
            this.txtThuTu.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtThuTu_KeyPress);
            // 
            // txtBiDanh
            // 
            this.txtBiDanh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtBiDanh.Enabled = false;
            this.txtBiDanh.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtBiDanh.ForeColor = System.Drawing.Color.Navy;
            this.txtBiDanh.Location = new System.Drawing.Point(115, 104);
            this.txtBiDanh.MaxLength = 20;
            this.txtBiDanh.Name = "txtBiDanh";
            this.txtBiDanh.Size = new System.Drawing.Size(153, 22);
            this.txtBiDanh.TabIndex = 10;
            this.toolTip1.SetToolTip(this.txtBiDanh, "Tên gọi khác");
            this.txtBiDanh.WordWrap = false;
            this.txtBiDanh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBiDanh_KeyDown);
            this.txtBiDanh.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtBiDanh_KeyPress);
            // 
            // txtTenNV
            // 
            this.txtTenNV.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtTenNV.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTenNV.Enabled = false;
            this.txtTenNV.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTenNV.ForeColor = System.Drawing.Color.Navy;
            this.txtTenNV.Location = new System.Drawing.Point(329, 79);
            this.txtTenNV.MaxLength = 10;
            this.txtTenNV.Name = "txtTenNV";
            this.txtTenNV.Size = new System.Drawing.Size(88, 22);
            this.txtTenNV.TabIndex = 8;
            this.toolTip1.SetToolTip(this.txtTenNV, "Nhập vào tên nhân viên");
            this.txtTenNV.WordWrap = false;
            this.txtTenNV.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTenNV_KeyDown);
            this.txtTenNV.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTenNV_KeyPress);
            // 
            // txtHoNV
            // 
            this.txtHoNV.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtHoNV.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtHoNV.Enabled = false;
            this.txtHoNV.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtHoNV.ForeColor = System.Drawing.Color.Navy;
            this.txtHoNV.Location = new System.Drawing.Point(115, 79);
            this.txtHoNV.MaxLength = 30;
            this.txtHoNV.Name = "txtHoNV";
            this.txtHoNV.Size = new System.Drawing.Size(154, 22);
            this.txtHoNV.TabIndex = 7;
            this.toolTip1.SetToolTip(this.txtHoNV, "Nhập vào họ lót");
            this.txtHoNV.WordWrap = false;
            this.txtHoNV.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHoNV_KeyDown);
            this.txtHoNV.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHoNV_KeyPress);
            this.txtHoNV.Validating += new System.ComponentModel.CancelEventHandler(this.txtHoNV_Validating);
            // 
            // txtChucVu
            // 
            this.txtChucVu.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtChucVu.Enabled = false;
            this.txtChucVu.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtChucVu.ForeColor = System.Drawing.Color.Navy;
            this.txtChucVu.Location = new System.Drawing.Point(115, 29);
            this.txtChucVu.MaxLength = 3;
            this.txtChucVu.Name = "txtChucVu";
            this.txtChucVu.Size = new System.Drawing.Size(71, 22);
            this.txtChucVu.TabIndex = 3;
            this.txtChucVu.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.toolTip1.SetToolTip(this.txtChucVu, "Nhập mã chức vụ");
            this.txtChucVu.WordWrap = false;
            this.txtChucVu.Validated += new System.EventHandler(this.txtChucVu_Validated);
            this.txtChucVu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtChucVu_KeyDown);
            this.txtChucVu.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtChucVu_KeyPress);
            // 
            // txtMaBP
            // 
            this.txtMaBP.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtMaBP.Enabled = false;
            this.txtMaBP.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtMaBP.ForeColor = System.Drawing.Color.Navy;
            this.txtMaBP.Location = new System.Drawing.Point(245, 4);
            this.txtMaBP.MaxLength = 3;
            this.txtMaBP.Name = "txtMaBP";
            this.txtMaBP.Size = new System.Drawing.Size(65, 22);
            this.txtMaBP.TabIndex = 1;
            this.toolTip1.SetToolTip(this.txtMaBP, "Nhập mã bộ phận");
            this.txtMaBP.WordWrap = false;
            this.txtMaBP.Validated += new System.EventHandler(this.txtMaBP_Validated);
            this.txtMaBP.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMaBP_KeyDown);
            // 
            // label19
            // 
            this.label19.ForeColor = System.Drawing.Color.Navy;
            this.label19.Location = new System.Drawing.Point(308, 334);
            this.label19.Name = "label19";
            this.label19.Size = new System.Drawing.Size(74, 13);
            this.label19.TabIndex = 71;
            this.label19.Text = "Ngoại ngữ  1 :";
            this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label18
            // 
            this.label18.ForeColor = System.Drawing.Color.Navy;
            this.label18.Location = new System.Drawing.Point(62, 333);
            this.label18.Name = "label18";
            this.label18.Size = new System.Drawing.Size(51, 13);
            this.label18.TabIndex = 70;
            this.label18.Text = "Học vấn:";
            this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label17
            // 
            this.label17.ForeColor = System.Drawing.Color.Navy;
            this.label17.Location = new System.Drawing.Point(374, 284);
            this.label17.Name = "label17";
            this.label17.Size = new System.Drawing.Size(56, 13);
            this.label17.TabIndex = 66;
            this.label17.Text = "Ngày cấp:";
            this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label16
            // 
            this.label16.ForeColor = System.Drawing.Color.Navy;
            this.label16.Location = new System.Drawing.Point(200, 284);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(47, 13);
            this.label16.TabIndex = 65;
            this.label16.Text = "Nơi cấp:";
            this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label15
            // 
            this.label15.ForeColor = System.Drawing.Color.Navy;
            this.label15.Location = new System.Drawing.Point(333, 259);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(97, 13);
            this.label15.TabIndex = 62;
            this.label15.Text = "Điện thoại di động:";
            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label14
            // 
            this.label14.ForeColor = System.Drawing.Color.Navy;
            this.label14.Location = new System.Drawing.Point(526, 103);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(47, 24);
            this.label14.TabIndex = 52;
            this.label14.Text = "Thứ tự:";
            this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label13
            // 
            this.label13.ForeColor = System.Drawing.Color.Navy;
            this.label13.Location = new System.Drawing.Point(286, 103);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(41, 24);
            this.label13.TabIndex = 51;
            this.label13.Text = "Phái:";
            this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label11
            // 
            this.label11.ForeColor = System.Drawing.Color.DarkBlue;
            this.label11.Location = new System.Drawing.Point(313, 309);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(69, 13);
            this.label11.TabIndex = 69;
            this.label11.Text = "Chuyên môn:";
            this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label9
            // 
            this.label9.ForeColor = System.Drawing.Color.DarkBlue;
            this.label9.Location = new System.Drawing.Point(55, 284);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(58, 13);
            this.label9.TabIndex = 64;
            this.label9.Text = "Số CMND:";
            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label8
            // 
            this.label8.ForeColor = System.Drawing.Color.DarkBlue;
            this.label8.Location = new System.Drawing.Point(35, 233);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(78, 13);
            this.label8.TabIndex = 60;
            this.label8.Text = "Nơi ở hiện nay:";
            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label7
            // 
            this.label7.ForeColor = System.Drawing.Color.DarkBlue;
            this.label7.Location = new System.Drawing.Point(51, 208);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(62, 13);
            this.label7.TabIndex = 59;
            this.label7.Text = "Thường trú:";
            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label6
            // 
            this.label6.ForeColor = System.Drawing.Color.DarkBlue;
            this.label6.Location = new System.Drawing.Point(39, 158);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(74, 13);
            this.label6.TabIndex = 57;
            this.label6.Text = "Nguyên quán:";
            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label5
            // 
            this.label5.ForeColor = System.Drawing.Color.DarkBlue;
            this.label5.Location = new System.Drawing.Point(65, 133);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(48, 13);
            this.label5.TabIndex = 53;
            this.label5.Text = "Dân tộc:";
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label4
            // 
            this.label4.ForeColor = System.Drawing.Color.DarkBlue;
            this.label4.Location = new System.Drawing.Point(37, 103);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(76, 24);
            this.label4.TabIndex = 50;
            this.label4.Text = "Tên gọi khác:";
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label3
            // 
            this.label3.ForeColor = System.Drawing.Color.DarkBlue;
            this.label3.Location = new System.Drawing.Point(64, 79);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(49, 24);
            this.label3.TabIndex = 48;
            this.label3.Text = "Họ :";
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label2
            // 
            this.label2.ForeColor = System.Drawing.Color.DarkBlue;
            this.label2.Location = new System.Drawing.Point(63, 33);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(50, 13);
            this.label2.TabIndex = 45;
            this.label2.Text = "Chức vụ:";
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label1
            // 
            this.label1.ForeColor = System.Drawing.Color.DarkBlue;
            this.label1.Location = new System.Drawing.Point(190, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(50, 13);
            this.label1.TabIndex = 44;
            this.label1.Text = "Bộ phận:";
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label27
            // 
            this.label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label27.ForeColor = System.Drawing.Color.Blue;
            this.label27.Location = new System.Drawing.Point(3, 10);
            this.label27.Name = "label27";
            this.label27.Size = new System.Drawing.Size(36, 13);
            this.label27.TabIndex = 80;
            this.label27.Text = "Tổng";
            this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtTSo
            // 
            this.txtTSo.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTSo.ForeColor = System.Drawing.Color.Red;
            this.txtTSo.Location = new System.Drawing.Point(41, 5);
            this.txtTSo.Name = "txtTSo";
            this.txtTSo.ReadOnly = true;
            this.txtTSo.Size = new System.Drawing.Size(51, 22);
            this.txtTSo.TabIndex = 81;
            this.txtTSo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtTSo.WordWrap = false;
            // 
            // txtMaSoNV
            // 
            this.txtMaSoNV.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtMaSoNV.Enabled = false;
            this.txtMaSoNV.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtMaSoNV.ForeColor = System.Drawing.Color.Blue;
            this.txtMaSoNV.Location = new System.Drawing.Point(115, 4);
            this.txtMaSoNV.MaxLength = 5;
            this.txtMaSoNV.Name = "txtMaSoNV";
            this.txtMaSoNV.ReadOnly = true;
            this.txtMaSoNV.Size = new System.Drawing.Size(71, 22);
            this.txtMaSoNV.TabIndex = 0;
            this.txtMaSoNV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.toolTip1.SetToolTip(this.txtMaSoNV, "Nhập mã nhân viên");
            this.txtMaSoNV.WordWrap = false;
            this.txtMaSoNV.Validated += new System.EventHandler(this.txtMaSoNV_Validated);
            this.txtMaSoNV.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMaSoNV_KeyDown);
            this.txtMaSoNV.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtMaSoNV_KeyPress);
            // 
            // label12
            // 
            this.label12.ForeColor = System.Drawing.Color.DarkBlue;
            this.label12.Location = new System.Drawing.Point(74, 8);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(39, 13);
            this.label12.TabIndex = 43;
            this.label12.Text = "Mã số:";
            this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.label12, "Nhập mã nhân viên");
            // 
            // lblCT
            // 
            this.lblCT.AutoSize = true;
            this.lblCT.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblCT.ForeColor = System.Drawing.Color.Blue;
            this.lblCT.Location = new System.Drawing.Point(43, 15);
            this.lblCT.Name = "lblCT";
            this.lblCT.Size = new System.Drawing.Size(50, 13);
            this.lblCT.TabIndex = 4;
            this.lblCT.Text = "Công tác";
            this.toolTip1.SetToolTip(this.lblCT, "Quá trình công tác");
            this.lblCT.Click += new System.EventHandler(this.lblCT_Click);
            // 
            // checkCT
            // 
            this.checkCT.BackColor = System.Drawing.SystemColors.Control;
            this.checkCT.Enabled = false;
            this.checkCT.ForeColor = System.Drawing.Color.Red;
            this.checkCT.Location = new System.Drawing.Point(8, 11);
            this.checkCT.Name = "checkCT";
            this.checkCT.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkCT.Size = new System.Drawing.Size(16, 24);
            this.checkCT.TabIndex = 0;
            this.checkCT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkCT.UseVisualStyleBackColor = false;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.pictureBox2);
            this.groupBox1.Controls.Add(this.pictureBox8);
            this.groupBox1.Controls.Add(this.checkDThe);
            this.groupBox1.Controls.Add(this.lblDThe);
            this.groupBox1.Controls.Add(this.pictureBox7);
            this.groupBox1.Controls.Add(this.checkSK);
            this.groupBox1.Controls.Add(this.lblSK);
            this.groupBox1.Controls.Add(this.pictureBox6);
            this.groupBox1.Controls.Add(this.checkCS);
            this.groupBox1.Controls.Add(this.lblCS);
            this.groupBox1.Controls.Add(this.pictureBox5);
            this.groupBox1.Controls.Add(this.checkNN);
            this.groupBox1.Controls.Add(this.lblNN);
            this.groupBox1.Controls.Add(this.pictureBox4);
            this.groupBox1.Controls.Add(this.checkGC);
            this.groupBox1.Controls.Add(this.lblGC);
            this.groupBox1.Controls.Add(this.pictureBox3);
            this.groupBox1.Controls.Add(this.pictureBox1);
            this.groupBox1.Controls.Add(this.checkHD);
            this.groupBox1.Controls.Add(this.lblHD);
            this.groupBox1.Controls.Add(this.checkDT);
            this.groupBox1.Controls.Add(this.lblDT);
            this.groupBox1.Controls.Add(this.checkCT);
            this.groupBox1.Controls.Add(this.lblCT);
            this.groupBox1.ForeColor = System.Drawing.Color.Navy;
            this.groupBox1.Location = new System.Drawing.Point(548, 494);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(216, 85);
            this.groupBox1.TabIndex = 67;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Quản lý nhân viên";
            // 
            // pictureBox2
            // 
            this.pictureBox2.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
            this.pictureBox2.Location = new System.Drawing.Point(24, 13);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(16, 16);
            this.pictureBox2.TabIndex = 171;
            this.pictureBox2.TabStop = false;
            // 
            // pictureBox8
            // 
            this.pictureBox8.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox8.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox8.Image")));
            this.pictureBox8.Location = new System.Drawing.Point(128, 64);
            this.pictureBox8.Name = "pictureBox8";
            this.pictureBox8.Size = new System.Drawing.Size(16, 16);
            this.pictureBox8.TabIndex = 170;
            this.pictureBox8.TabStop = false;
            // 
            // checkDThe
            // 
            this.checkDThe.BackColor = System.Drawing.SystemColors.Control;
            this.checkDThe.Enabled = false;
            this.checkDThe.ForeColor = System.Drawing.Color.Red;
            this.checkDThe.Location = new System.Drawing.Point(112, 59);
            this.checkDThe.Name = "checkDThe";
            this.checkDThe.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkDThe.Size = new System.Drawing.Size(16, 24);
            this.checkDThe.TabIndex = 11;
            this.checkDThe.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkDThe.UseVisualStyleBackColor = false;
            // 
            // lblDThe
            // 
            this.lblDThe.AutoSize = true;
            this.lblDThe.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblDThe.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblDThe.ForeColor = System.Drawing.Color.Blue;
            this.lblDThe.Location = new System.Drawing.Point(145, 64);
            this.lblDThe.Name = "lblDThe";
            this.lblDThe.Size = new System.Drawing.Size(51, 13);
            this.lblDThe.TabIndex = 15;
            this.lblDThe.Text = "Đoàn thể";
            this.toolTip1.SetToolTip(this.lblDThe, "Thông tin về Đoàn, Đảng");
            this.lblDThe.Click += new System.EventHandler(this.lblDThe_Click_1);
            // 
            // pictureBox7
            // 
            this.pictureBox7.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox7.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox7.Image")));
            this.pictureBox7.Location = new System.Drawing.Point(128, 48);
            this.pictureBox7.Name = "pictureBox7";
            this.pictureBox7.Size = new System.Drawing.Size(16, 16);
            this.pictureBox7.TabIndex = 167;
            this.pictureBox7.TabStop = false;
            // 
            // checkSK
            // 
            this.checkSK.BackColor = System.Drawing.SystemColors.Control;
            this.checkSK.Enabled = false;
            this.checkSK.ForeColor = System.Drawing.Color.Red;
            this.checkSK.Location = new System.Drawing.Point(112, 44);
            this.checkSK.Name = "checkSK";
            this.checkSK.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkSK.Size = new System.Drawing.Size(16, 24);
            this.checkSK.TabIndex = 10;
            this.checkSK.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkSK.UseVisualStyleBackColor = false;
            // 
            // lblSK
            // 
            this.lblSK.AutoSize = true;
            this.lblSK.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblSK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblSK.ForeColor = System.Drawing.Color.Blue;
            this.lblSK.Location = new System.Drawing.Point(144, 47);
            this.lblSK.Name = "lblSK";
            this.lblSK.Size = new System.Drawing.Size(53, 13);
            this.lblSK.TabIndex = 14;
            this.lblSK.Text = "Sức khỏe";
            this.toolTip1.SetToolTip(this.lblSK, "Thông tin về sức khoẻ");
            this.lblSK.Click += new System.EventHandler(this.lblSK_Click);
            // 
            // pictureBox6
            // 
            this.pictureBox6.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
            this.pictureBox6.Location = new System.Drawing.Point(128, 31);
            this.pictureBox6.Name = "pictureBox6";
            this.pictureBox6.Size = new System.Drawing.Size(16, 16);
            this.pictureBox6.TabIndex = 164;
            this.pictureBox6.TabStop = false;
            // 
            // checkCS
            // 
            this.checkCS.BackColor = System.Drawing.SystemColors.Control;
            this.checkCS.Enabled = false;
            this.checkCS.ForeColor = System.Drawing.Color.Red;
            this.checkCS.Location = new System.Drawing.Point(112, 27);
            this.checkCS.Name = "checkCS";
            this.checkCS.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkCS.Size = new System.Drawing.Size(16, 24);
            this.checkCS.TabIndex = 9;
            this.checkCS.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkCS.UseVisualStyleBackColor = false;
            // 
            // lblCS
            // 
            this.lblCS.AutoSize = true;
            this.lblCS.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblCS.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblCS.ForeColor = System.Drawing.Color.Blue;
            this.lblCS.Location = new System.Drawing.Point(144, 31);
            this.lblCS.Name = "lblCS";
            this.lblCS.Size = new System.Drawing.Size(40, 13);
            this.lblCS.TabIndex = 13;
            this.lblCS.Text = "Cấp sổ";
            this.toolTip1.SetToolTip(this.lblCS, "Thông tin về cấp sổ");
            this.lblCS.Click += new System.EventHandler(this.lblCS_Click);
            // 
            // pictureBox5
            // 
            this.pictureBox5.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
            this.pictureBox5.Location = new System.Drawing.Point(128, 14);
            this.pictureBox5.Name = "pictureBox5";
            this.pictureBox5.Size = new System.Drawing.Size(16, 16);
            this.pictureBox5.TabIndex = 161;
            this.pictureBox5.TabStop = false;
            // 
            // checkNN
            // 
            this.checkNN.BackColor = System.Drawing.SystemColors.Control;
            this.checkNN.Enabled = false;
            this.checkNN.ForeColor = System.Drawing.Color.Red;
            this.checkNN.Location = new System.Drawing.Point(112, 10);
            this.checkNN.Name = "checkNN";
            this.checkNN.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkNN.Size = new System.Drawing.Size(16, 24);
            this.checkNN.TabIndex = 8;
            this.checkNN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkNN.UseVisualStyleBackColor = false;
            // 
            // lblNN
            // 
            this.lblNN.AutoSize = true;
            this.lblNN.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblNN.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblNN.ForeColor = System.Drawing.Color.Blue;
            this.lblNN.Location = new System.Drawing.Point(144, 14);
            this.lblNN.Name = "lblNN";
            this.lblNN.Size = new System.Drawing.Size(62, 13);
            this.lblNN.TabIndex = 12;
            this.lblNN.Text = "Nước ngoài";
            this.toolTip1.SetToolTip(this.lblNN, "Quá trình công tác ở nước ngoài");
            this.lblNN.Click += new System.EventHandler(this.lblNN_Click);
            // 
            // pictureBox4
            // 
            this.pictureBox4.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
            this.pictureBox4.Location = new System.Drawing.Point(24, 62);
            this.pictureBox4.Name = "pictureBox4";
            this.pictureBox4.Size = new System.Drawing.Size(16, 16);
            this.pictureBox4.TabIndex = 158;
            this.pictureBox4.TabStop = false;
            // 
            // checkGC
            // 
            this.checkGC.BackColor = System.Drawing.SystemColors.Control;
            this.checkGC.Enabled = false;
            this.checkGC.ForeColor = System.Drawing.Color.Red;
            this.checkGC.Location = new System.Drawing.Point(8, 57);
            this.checkGC.Name = "checkGC";
            this.checkGC.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkGC.Size = new System.Drawing.Size(16, 24);
            this.checkGC.TabIndex = 3;
            this.checkGC.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkGC.UseVisualStyleBackColor = false;
            // 
            // lblGC
            // 
            this.lblGC.AutoSize = true;
            this.lblGC.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblGC.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblGC.ForeColor = System.Drawing.Color.Blue;
            this.lblGC.Location = new System.Drawing.Point(43, 64);
            this.lblGC.Name = "lblGC";
            this.lblGC.Size = new System.Drawing.Size(50, 13);
            this.lblGC.TabIndex = 7;
            this.lblGC.Text = "Gia cảnh";
            this.toolTip1.SetToolTip(this.lblGC, "Thông tin về gia cảnh");
            this.lblGC.Click += new System.EventHandler(this.lblGC_Click);
            // 
            // pictureBox3
            // 
            this.pictureBox3.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
            this.pictureBox3.Location = new System.Drawing.Point(24, 46);
            this.pictureBox3.Name = "pictureBox3";
            this.pictureBox3.Size = new System.Drawing.Size(16, 16);
            this.pictureBox3.TabIndex = 155;
            this.pictureBox3.TabStop = false;
            // 
            // pictureBox1
            // 
            this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(24, 29);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(16, 16);
            this.pictureBox1.TabIndex = 153;
            this.pictureBox1.TabStop = false;
            // 
            // checkHD
            // 
            this.checkHD.BackColor = System.Drawing.SystemColors.Control;
            this.checkHD.Enabled = false;
            this.checkHD.ForeColor = System.Drawing.Color.Red;
            this.checkHD.Location = new System.Drawing.Point(8, 42);
            this.checkHD.Name = "checkHD";
            this.checkHD.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkHD.Size = new System.Drawing.Size(16, 24);
            this.checkHD.TabIndex = 2;
            this.checkHD.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkHD.UseVisualStyleBackColor = false;
            // 
            // lblHD
            // 
            this.lblHD.AutoSize = true;
            this.lblHD.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblHD.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblHD.ForeColor = System.Drawing.Color.Blue;
            this.lblHD.Location = new System.Drawing.Point(42, 46);
            this.lblHD.Name = "lblHD";
            this.lblHD.Size = new System.Drawing.Size(55, 13);
            this.lblHD.TabIndex = 6;
            this.lblHD.Text = "Hợp đồng";
            this.toolTip1.SetToolTip(this.lblHD, "Thông tin hợp đồng");
            this.lblHD.Click += new System.EventHandler(this.lblHD_Click);
            // 
            // checkDT
            // 
            this.checkDT.BackColor = System.Drawing.SystemColors.Control;
            this.checkDT.Enabled = false;
            this.checkDT.ForeColor = System.Drawing.Color.Blue;
            this.checkDT.Location = new System.Drawing.Point(8, 26);
            this.checkDT.Name = "checkDT";
            this.checkDT.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.checkDT.Size = new System.Drawing.Size(16, 24);
            this.checkDT.TabIndex = 1;
            this.checkDT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.checkDT.UseVisualStyleBackColor = false;
            // 
            // lblDT
            // 
            this.lblDT.AutoSize = true;
            this.lblDT.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblDT.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblDT.ForeColor = System.Drawing.Color.Blue;
            this.lblDT.Location = new System.Drawing.Point(44, 30);
            this.lblDT.Name = "lblDT";
            this.lblDT.Size = new System.Drawing.Size(45, 13);
            this.lblDT.TabIndex = 5;
            this.lblDT.Text = "Đào tạo";
            this.toolTip1.SetToolTip(this.lblDT, "Quá trình đào tạo");
            this.lblDT.Click += new System.EventHandler(this.lblDT_Click);
            // 
            // label29
            // 
            this.label29.ForeColor = System.Drawing.Color.Navy;
            this.label29.Location = new System.Drawing.Point(566, 134);
            this.label29.Name = "label29";
            this.label29.Size = new System.Drawing.Size(54, 13);
            this.label29.TabIndex = 56;
            this.label29.Text = "Năm sinh:";
            this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtnamsinh
            // 
            this.txtnamsinh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtnamsinh.Enabled = false;
            this.txtnamsinh.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtnamsinh.ForeColor = System.Drawing.Color.Navy;
            this.txtnamsinh.Location = new System.Drawing.Point(622, 129);
            this.txtnamsinh.MaxLength = 4;
            this.txtnamsinh.Name = "txtnamsinh";
            this.txtnamsinh.Size = new System.Drawing.Size(53, 22);
            this.txtnamsinh.TabIndex = 16;
            this.toolTip1.SetToolTip(this.txtnamsinh, "Nhập năm sinh");
            this.txtnamsinh.WordWrap = false;
            this.txtnamsinh.Validated += new System.EventHandler(this.txtnamsinh_Validated);
            this.txtnamsinh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtnamsinh_KeyDown);
            this.txtnamsinh.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtnamsinh_KeyPress);
            // 
            // cboNgoaingu3
            // 
            this.cboNgoaingu3.BackColor = System.Drawing.Color.White;
            this.cboNgoaingu3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboNgoaingu3.Enabled = false;
            this.cboNgoaingu3.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboNgoaingu3.ForeColor = System.Drawing.Color.Navy;
            this.cboNgoaingu3.Location = new System.Drawing.Point(349, 521);
            this.cboNgoaingu3.Name = "cboNgoaingu3";
            this.cboNgoaingu3.Size = new System.Drawing.Size(168, 22);
            this.cboNgoaingu3.TabIndex = 36;
            this.cboNgoaingu3.Visible = false;
            // 
            // label28
            // 
            this.label28.AutoSize = true;
            this.label28.ForeColor = System.Drawing.Color.Navy;
            this.label28.Location = new System.Drawing.Point(276, 525);
            this.label28.Name = "label28";
            this.label28.Size = new System.Drawing.Size(68, 13);
            this.label28.TabIndex = 73;
            this.label28.Text = "Ngoại ngữ 3:";
            this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.label28.Visible = false;
            // 
            // cboNgoaingu2
            // 
            this.cboNgoaingu2.BackColor = System.Drawing.Color.White;
            this.cboNgoaingu2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboNgoaingu2.Enabled = false;
            this.cboNgoaingu2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboNgoaingu2.ForeColor = System.Drawing.Color.Navy;
            this.cboNgoaingu2.Location = new System.Drawing.Point(109, 520);
            this.cboNgoaingu2.Name = "cboNgoaingu2";
            this.cboNgoaingu2.Size = new System.Drawing.Size(160, 22);
            this.cboNgoaingu2.TabIndex = 35;
            this.cboNgoaingu2.Visible = false;
            // 
            // label30
            // 
            this.label30.AutoSize = true;
            this.label30.ForeColor = System.Drawing.Color.Navy;
            this.label30.Location = new System.Drawing.Point(38, 527);
            this.label30.Name = "label30";
            this.label30.Size = new System.Drawing.Size(68, 13);
            this.label30.TabIndex = 72;
            this.label30.Text = "Ngoại ngữ 2:";
            this.label30.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.label30.Visible = false;
            // 
            // label31
            // 
            this.label31.ForeColor = System.Drawing.Color.DarkBlue;
            this.label31.Location = new System.Drawing.Point(51, 308);
            this.label31.Name = "label31";
            this.label31.Size = new System.Drawing.Size(62, 13);
            this.label31.TabIndex = 68;
            this.label31.Text = "Chức danh:";
            this.label31.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label32
            // 
            this.label32.ForeColor = System.Drawing.Color.Navy;
            this.label32.Location = new System.Drawing.Point(55, 259);
            this.label32.Name = "label32";
            this.label32.Size = new System.Drawing.Size(58, 13);
            this.label32.TabIndex = 61;
            this.label32.Text = "Điện thoại:";
            this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtCellphone
            // 
            this.txtCellphone.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtCellphone.Enabled = false;
            this.txtCellphone.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtCellphone.ForeColor = System.Drawing.Color.Navy;
            this.txtCellphone.Location = new System.Drawing.Point(431, 254);
            this.txtCellphone.MaxLength = 15;
            this.txtCellphone.Name = "txtCellphone";
            this.txtCellphone.Size = new System.Drawing.Size(108, 22);
            this.txtCellphone.TabIndex = 27;
            this.toolTip1.SetToolTip(this.txtCellphone, "Nhập điện thoại di động");
            this.txtCellphone.WordWrap = false;
            this.txtCellphone.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
            this.txtCellphone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTGBN_KeyPress);
            // 
            // cboNgoaingu4
            // 
            this.cboNgoaingu4.BackColor = System.Drawing.Color.White;
            this.cboNgoaingu4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboNgoaingu4.Enabled = false;
            this.cboNgoaingu4.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboNgoaingu4.ForeColor = System.Drawing.Color.Navy;
            this.cboNgoaingu4.Location = new System.Drawing.Point(589, 520);
            this.cboNgoaingu4.Name = "cboNgoaingu4";
            this.cboNgoaingu4.Size = new System.Drawing.Size(160, 22);
            this.cboNgoaingu4.TabIndex = 37;
            this.cboNgoaingu4.Visible = false;
            // 
            // label33
            // 
            this.label33.AutoSize = true;
            this.label33.ForeColor = System.Drawing.Color.Navy;
            this.label33.Location = new System.Drawing.Point(515, 524);
            this.label33.Name = "label33";
            this.label33.Size = new System.Drawing.Size(68, 13);
            this.label33.TabIndex = 74;
            this.label33.Text = "Ngoại ngữ 4:";
            this.label33.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.label33.Visible = false;
            // 
            // label34
            // 
            this.label34.ForeColor = System.Drawing.Color.DarkBlue;
            this.label34.Location = new System.Drawing.Point(2, 59);
            this.label34.Name = "label34";
            this.label34.Size = new System.Drawing.Size(111, 13);
            this.label34.TabIndex = 46;
            this.label34.Text = "Ngày được bổ nhiệm:";
            this.label34.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label35
            // 
            this.label35.ForeColor = System.Drawing.Color.DarkBlue;
            this.label35.Location = new System.Drawing.Point(196, 58);
            this.label35.Name = "label35";
            this.label35.Size = new System.Drawing.Size(131, 14);
            this.label35.TabIndex = 47;
            this.label35.Text = "Thời gian được bổ nhiệm:";
            this.label35.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtTGBN
            // 
            this.txtTGBN.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtTGBN.Enabled = false;
            this.txtTGBN.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtTGBN.Location = new System.Drawing.Point(329, 54);
            this.txtTGBN.Name = "txtTGBN";
            this.txtTGBN.Size = new System.Drawing.Size(88, 20);
            this.txtTGBN.TabIndex = 6;
            this.txtTGBN.Text = "0";
            this.txtTGBN.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.toolTip1.SetToolTip(this.txtTGBN, "Nhập thời gian được bổ nhiệm");
            this.txtTGBN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTGBN_KeyDown);
            this.txtTGBN.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTGBN_KeyPress);
            // 
            // cboChucdanh
            // 
            this.cboChucdanh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.cboChucdanh.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboChucdanh.Enabled = false;
            this.cboChucdanh.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboChucdanh.ForeColor = System.Drawing.Color.Navy;
            this.cboChucdanh.Location = new System.Drawing.Point(115, 304);
            this.cboChucdanh.Name = "cboChucdanh";
            this.cboChucdanh.Size = new System.Drawing.Size(188, 22);
            this.cboChucdanh.TabIndex = 31;
            this.toolTip1.SetToolTip(this.cboChucdanh, "Chọn chức danh");
            this.cboChucdanh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboChucdanh_KeyDown_1);
            // 
            // toolTip1
            // 
            this.toolTip1.AutoPopDelay = 5000;
            this.toolTip1.InitialDelay = 5;
            this.toolTip1.ReshowDelay = 100;
            // 
            // txtSotk
            // 
            this.txtSotk.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.txtSotk.Enabled = false;
            this.txtSotk.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtSotk.ForeColor = System.Drawing.Color.Navy;
            this.txtSotk.Location = new System.Drawing.Point(293, 380);
            this.txtSotk.MaxLength = 15;
            this.txtSotk.Name = "txtSotk";
            this.txtSotk.Size = new System.Drawing.Size(128, 22);
            this.txtSotk.TabIndex = 41;
            this.toolTip1.SetToolTip(this.txtSotk, "Nhập số điện thoại");
            this.txtSotk.WordWrap = false;
            this.txtSotk.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSotk_KeyDown);
            // 
            // butChonHinh
            // 
            this.butChonHinh.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butChonHinh.ForeColor = System.Drawing.Color.Navy;
            this.butChonHinh.Image = ((System.Drawing.Image)(resources.GetObject("butChonHinh.Image")));
            this.butChonHinh.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butChonHinh.Location = new System.Drawing.Point(7, 113);
            this.butChonHinh.Name = "butChonHinh";
            this.butChonHinh.Size = new System.Drawing.Size(96, 26);
            this.butChonHinh.TabIndex = 63;
            this.butChonHinh.Text = "  Chọn hình ";
            this.toolTip1.SetToolTip(this.butChonHinh, "Chọn ảnh nhân viên");
            this.butChonHinh.Click += new System.EventHandler(this.butChonHinh_Click);
            this.butChonHinh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.butChonHinh_KeyDown);
            // 
            // butEdit
            // 
            this.butEdit.BackColor = System.Drawing.SystemColors.Control;
            this.butEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butEdit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butEdit.Image = ((System.Drawing.Image)(resources.GetObject("butEdit.Image")));
            this.butEdit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butEdit.Location = new System.Drawing.Point(287, 3);
            this.butEdit.Name = "butEdit";
            this.butEdit.Size = new System.Drawing.Size(65, 28);
            this.butEdit.TabIndex = 84;
            this.butEdit.Text = "  &Sửa";
            this.toolTip1.SetToolTip(this.butEdit, "Alt+S");
            this.butEdit.UseVisualStyleBackColor = true;
            this.butEdit.Click += new System.EventHandler(this.butEdit_Click);
            // 
            // butXem
            // 
            this.butXem.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butXem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butXem.Image = ((System.Drawing.Image)(resources.GetObject("butXem.Image")));
            this.butXem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butXem.Location = new System.Drawing.Point(638, 3);
            this.butXem.Name = "butXem";
            this.butXem.Size = new System.Drawing.Size(65, 28);
            this.butXem.TabIndex = 46;
            this.butXem.Text = "    &Xem";
            this.toolTip1.SetToolTip(this.butXem, "Alt+X");
            this.butXem.Click += new System.EventHandler(this.butXem_Click);
            // 
            // butTim
            // 
            this.butTim.BackColor = System.Drawing.SystemColors.Control;
            this.butTim.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butTim.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butTim.Image = ((System.Drawing.Image)(resources.GetObject("butTim.Image")));
            this.butTim.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butTim.Location = new System.Drawing.Point(569, 3);
            this.butTim.Name = "butTim";
            this.butTim.Size = new System.Drawing.Size(65, 28);
            this.butTim.TabIndex = 45;
            this.butTim.Text = "   &Tìm";
            this.toolTip1.SetToolTip(this.butTim, "Alt+I");
            this.butTim.UseVisualStyleBackColor = true;
            this.butTim.Click += new System.EventHandler(this.butTim_Click);
            // 
            // butCancel
            // 
            this.butCancel.Enabled = false;
            this.butCancel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.butCancel.Image = ((System.Drawing.Image)(resources.GetObject("butCancel.Image")));
            this.butCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butCancel.Location = new System.Drawing.Point(495, 3);
            this.butCancel.Name = "butCancel";
            this.butCancel.Size = new System.Drawing.Size(70, 28);
            this.butCancel.TabIndex = 83;
            this.butCancel.Text = "&Bỏ qua";
            this.butCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.butCancel, "Alt+B");
            this.butCancel.UseVisualStyleBackColor = true;
            this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
            // 
            // butTruoc
            // 
            this.butTruoc.BackColor = System.Drawing.SystemColors.Control;
            this.butTruoc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butTruoc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butTruoc.Image = global::Human.Properties.Resources.PRVREC_S;
            this.butTruoc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butTruoc.Location = new System.Drawing.Point(98, 3);
            this.butTruoc.Name = "butTruoc";
            this.butTruoc.Size = new System.Drawing.Size(56, 26);
            this.butTruoc.TabIndex = 43;
            this.butTruoc.Text = "  &Trước";
            this.butTruoc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.butTruoc, "Alt+R");
            this.butTruoc.UseVisualStyleBackColor = true;
            this.butTruoc.Click += new System.EventHandler(this.butTruoc_Click);
            // 
            // butThem
            // 
            this.butThem.BackColor = System.Drawing.SystemColors.Control;
            this.butThem.Enabled = false;
            this.butThem.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butThem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butThem.Image = ((System.Drawing.Image)(resources.GetObject("butThem.Image")));
            this.butThem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butThem.Location = new System.Drawing.Point(426, 3);
            this.butThem.Name = "butThem";
            this.butThem.Size = new System.Drawing.Size(65, 28);
            this.butThem.TabIndex = 40;
            this.butThem.Text = "   &Lưu";
            this.toolTip1.SetToolTip(this.butThem, "Alt+L");
            this.butThem.UseVisualStyleBackColor = true;
            this.butThem.Click += new System.EventHandler(this.butThem_Click);
            // 
            // butHuy
            // 
            this.butHuy.BackColor = System.Drawing.SystemColors.Control;
            this.butHuy.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butHuy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butHuy.Image = ((System.Drawing.Image)(resources.GetObject("butHuy.Image")));
            this.butHuy.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butHuy.Location = new System.Drawing.Point(356, 3);
            this.butHuy.Name = "butHuy";
            this.butHuy.Size = new System.Drawing.Size(65, 28);
            this.butHuy.TabIndex = 44;
            this.butHuy.Text = "  &Hủy";
            this.toolTip1.SetToolTip(this.butHuy, "Alt+H");
            this.butHuy.UseVisualStyleBackColor = true;
            this.butHuy.Click += new System.EventHandler(this.butHuy_Click);
            // 
            // butTiep
            // 
            this.butTiep.BackColor = System.Drawing.SystemColors.Control;
            this.butTiep.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butTiep.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butTiep.Image = ((System.Drawing.Image)(resources.GetObject("butTiep.Image")));
            this.butTiep.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butTiep.Location = new System.Drawing.Point(218, 3);
            this.butTiep.Name = "butTiep";
            this.butTiep.Size = new System.Drawing.Size(65, 28);
            this.butTiep.TabIndex = 41;
            this.butTiep.Text = "  Thêm";
            this.toolTip1.SetToolTip(this.butTiep, "Alt+T");
            this.butTiep.UseVisualStyleBackColor = true;
            this.butTiep.Click += new System.EventHandler(this.butTiep_Click);
            // 
            // butSau
            // 
            this.butSau.BackColor = System.Drawing.SystemColors.Control;
            this.butSau.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butSau.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butSau.Image = ((System.Drawing.Image)(resources.GetObject("butSau.Image")));
            this.butSau.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.butSau.Location = new System.Drawing.Point(158, 3);
            this.butSau.Name = "butSau";
            this.butSau.Size = new System.Drawing.Size(56, 26);
            this.butSau.TabIndex = 42;
            this.butSau.Text = "&Sau";
            this.butSau.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.toolTip1.SetToolTip(this.butSau, "Alt+N");
            this.butSau.UseVisualStyleBackColor = true;
            this.butSau.Click += new System.EventHandler(this.butSau_Click);
            // 
            // butKetThuc
            // 
            this.butKetThuc.BackColor = System.Drawing.SystemColors.Control;
            this.butKetThuc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butKetThuc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.butKetThuc.Image = global::Human.Properties.Resources.close_r;
            this.butKetThuc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butKetThuc.Location = new System.Drawing.Point(707, 3);
            this.butKetThuc.Name = "butKetThuc";
            this.butKetThuc.Size = new System.Drawing.Size(75, 28);
            this.butKetThuc.TabIndex = 10;
            this.butKetThuc.Text = "&Kết thúc";
            this.butKetThuc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.butKetThuc, "Alt+K");
            this.butKetThuc.UseVisualStyleBackColor = true;
            this.butKetThuc.Click += new System.EventHandler(this.butKetThuc_Click);
            // 
            // tabllnv
            // 
            this.tabllnv.Controls.Add(this.tabPage1);
            this.tabllnv.Controls.Add(this.tabPage2);
            this.tabllnv.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tabllnv.ImageList = this.ilsIcons32;
            this.tabllnv.ItemSize = new System.Drawing.Size(380, 30);
            this.tabllnv.Location = new System.Drawing.Point(0, 78);
            this.tabllnv.Name = "tabllnv";
            this.tabllnv.SelectedIndex = 0;
            this.tabllnv.Size = new System.Drawing.Size(790, 461);
            this.tabllnv.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
            this.tabllnv.TabIndex = 0;
            this.tabllnv.Click += new System.EventHandler(this.tabllnv_Click);
            // 
            // tabPage1
            // 
            this.tabPage1.Controls.Add(this.txt_macc);
            this.tabPage1.Controls.Add(this.txtNganhang);
            this.tabPage1.Controls.Add(this.label39);
            this.tabPage1.Controls.Add(this.label43);
            this.tabPage1.Controls.Add(this.txtipmay);
            this.tabPage1.Controls.Add(this.txt_masothue);
            this.tabPage1.Controls.Add(this.lblvantay);
            this.tabPage1.Controls.Add(this.txtSotk);
            this.tabPage1.Controls.Add(this.lbipmay);
            this.tabPage1.Controls.Add(this.finger);
            this.tabPage1.Controls.Add(this.label44);
            this.tabPage1.Controls.Add(this.ptb);
            this.tabPage1.Controls.Add(this.label40);
            this.tabPage1.Controls.Add(this.lbl_macc);
            this.tabPage1.Controls.Add(this.label41);
            this.tabPage1.Controls.Add(this.groupBox2);
            this.tabPage1.Controls.Add(this.cboChinhtri);
            this.tabPage1.Controls.Add(this.label38);
            this.tabPage1.Controls.Add(this.label37);
            this.tabPage1.Controls.Add(this.vitinh);
            this.tabPage1.Controls.Add(this.label36);
            this.tabPage1.Controls.Add(this.ngoaingu2);
            this.tabPage1.Controls.Add(this.dtpNgayCapCMND);
            this.tabPage1.Controls.Add(this.dtpNgaySinh);
            this.tabPage1.Controls.Add(this.txtNgayBN);
            this.tabPage1.Controls.Add(this.label26);
            this.tabPage1.Controls.Add(this.label4);
            this.tabPage1.Controls.Add(this.label15);
            this.tabPage1.Controls.Add(this.label20);
            this.tabPage1.Controls.Add(this.cboQuanOHN);
            this.tabPage1.Controls.Add(this.cboChiBo);
            this.tabPage1.Controls.Add(this.txtNoiSinh);
            this.tabPage1.Controls.Add(this.txtMVTat);
            this.tabPage1.Controls.Add(this.label13);
            this.tabPage1.Controls.Add(this.label12);
            this.tabPage1.Controls.Add(this.label11);
            this.tabPage1.Controls.Add(this.label14);
            this.tabPage1.Controls.Add(this.txtTenNV);
            this.tabPage1.Controls.Add(this.label34);
            this.tabPage1.Controls.Add(this.cboQuanThuongTru);
            this.tabPage1.Controls.Add(this.txtnamsinh);
            this.tabPage1.Controls.Add(this.cboPhai);
            this.tabPage1.Controls.Add(this.label19);
            this.tabPage1.Controls.Add(this.cboTonGiao);
            this.tabPage1.Controls.Add(this.label22);
            this.tabPage1.Controls.Add(this.cboDang);
            this.tabPage1.Controls.Add(this.label31);
            this.tabPage1.Controls.Add(this.cboChucdanh);
            this.tabPage1.Controls.Add(this.label18);
            this.tabPage1.Controls.Add(this.txtNoiCapCMND);
            this.tabPage1.Controls.Add(this.cboNguyenQuan);
            this.tabPage1.Controls.Add(this.txtMaSoNV);
            this.tabPage1.Controls.Add(this.label9);
            this.tabPage1.Controls.Add(this.label1);
            this.tabPage1.Controls.Add(this.label32);
            this.tabPage1.Controls.Add(this.txtCellphone);
            this.tabPage1.Controls.Add(this.label74);
            this.tabPage1.Controls.Add(this.label2);
            this.tabPage1.Controls.Add(this.cboTinhOHN);
            this.tabPage1.Controls.Add(this.txtHoNV);
            this.tabPage1.Controls.Add(this.label3);
            this.tabPage1.Controls.Add(this.cboHocVan);
            this.tabPage1.Controls.Add(this.cboCongDoan);
            this.tabPage1.Controls.Add(this.txtChucVu);
            this.tabPage1.Controls.Add(this.label21);
            this.tabPage1.Controls.Add(this.label24);
            this.tabPage1.Controls.Add(this.label5);
            this.tabPage1.Controls.Add(this.txtNoiOHN);
            this.tabPage1.Controls.Add(this.label6);
            this.tabPage1.Controls.Add(this.txtThuongTru);
            this.tabPage1.Controls.Add(this.txtThuTu);
            this.tabPage1.Controls.Add(this.txtNguyenQuan);
            this.tabPage1.Controls.Add(this.cboNgoaiNgu1);
            this.tabPage1.Controls.Add(this.label35);
            this.tabPage1.Controls.Add(this.txtDienThoai);
            this.tabPage1.Controls.Add(this.label17);
            this.tabPage1.Controls.Add(this.cboChucVu);
            this.tabPage1.Controls.Add(this.cboBoPhan);
            this.tabPage1.Controls.Add(this.label7);
            this.tabPage1.Controls.Add(this.txtTGBN);
            this.tabPage1.Controls.Add(this.cboChuyenMon);
            this.tabPage1.Controls.Add(this.cboTinhThuongTru);
            this.tabPage1.Controls.Add(this.label16);
            this.tabPage1.Controls.Add(this.txtBiDanh);
            this.tabPage1.Controls.Add(this.label29);
            this.tabPage1.Controls.Add(this.label8);
            this.tabPage1.Controls.Add(this.label23);
            this.tabPage1.Controls.Add(this.txtSoCMND);
            this.tabPage1.Controls.Add(this.cboDoan);
            this.tabPage1.Controls.Add(this.cboDanToc);
            this.tabPage1.Controls.Add(this.label25);
            this.tabPage1.Controls.Add(this.txtMaBP);
            this.tabPage1.ImageIndex = 0;
            this.tabPage1.Location = new System.Drawing.Point(4, 34);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Size = new System.Drawing.Size(782, 423);
            this.tabPage1.TabIndex = 0;
            this.tabPage1.Text = "Lý lịch ";
            this.tabPage1.UseVisualStyleBackColor = true;
            // 
            // txt_macc
            // 
            this.txt_macc.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_macc.Enabled = false;
            this.txt_macc.Location = new System.Drawing.Point(532, 55);
            this.txt_macc.MaxLength = 50;
            this.txt_macc.Name = "txt_macc";
            this.txt_macc.Size = new System.Drawing.Size(143, 20);
            this.txt_macc.TabIndex = 262;
            this.txt_macc.Visible = false;
            this.txt_macc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_macc_KeyDown);
            // 
            // txtNganhang
            // 
            this.txtNganhang.BackColor = System.Drawing.SystemColors.Control;
            this.txtNganhang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.txtNganhang.Enabled = false;
            this.txtNganhang.ForeColor = System.Drawing.SystemColors.Window;
            this.txtNganhang.FormattingEnabled = true;
            this.txtNganhang.Location = new System.Drawing.Point(518, 381);
            this.txtNganhang.Name = "txtNganhang";
            this.txtNganhang.Size = new System.Drawing.Size(236, 21);
            this.txtNganhang.TabIndex = 42;
            this.txtNganhang.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNganhang_KeyDown);
            // 
            // label39
            // 
            this.label39.ForeColor = System.Drawing.Color.Navy;
            this.label39.Location = new System.Drawing.Point(424, 385);
            this.label39.Name = "label39";
            this.label39.Size = new System.Drawing.Size(90, 13);
            this.label39.TabIndex = 230;
            this.label39.Text = "Nơi mở tài khoản:";
            this.label39.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label43
            // 
            this.label43.ForeColor = System.Drawing.Color.Navy;
            this.label43.Location = new System.Drawing.Point(286, 76);
            this.label43.Name = "label43";
            this.label43.Size = new System.Drawing.Size(41, 24);
            this.label43.TabIndex = 261;
            this.label43.Text = "Tên:";
            this.label43.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtipmay
            // 
            this.txtipmay.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.txtipmay.Enabled = false;
            this.txtipmay.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtipmay.ForeColor = System.Drawing.Color.Navy;
            this.txtipmay.Location = new System.Drawing.Point(114, 404);
            this.txtipmay.MaxLength = 15;
            this.txtipmay.Name = "txtipmay";
            this.txtipmay.Size = new System.Drawing.Size(105, 22);
            this.txtipmay.TabIndex = 43;
            this.txtipmay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtipmay.WordWrap = false;
            this.txtipmay.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_masothue_KeyDown);
            this.txtipmay.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtipmay_KeyPress);
            // 
            // txt_masothue
            // 
            this.txt_masothue.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.txt_masothue.Enabled = false;
            this.txt_masothue.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_masothue.ForeColor = System.Drawing.Color.Navy;
            this.txt_masothue.Location = new System.Drawing.Point(114, 380);
            this.txt_masothue.MaxLength = 15;
            this.txt_masothue.Name = "txt_masothue";
            this.txt_masothue.Size = new System.Drawing.Size(105, 22);
            this.txt_masothue.TabIndex = 40;
            this.txt_masothue.WordWrap = false;
            this.txt_masothue.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_masothue_KeyDown);
            this.txt_masothue.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_masothue_KeyPress);
            // 
            // lblvantay
            // 
            this.lblvantay.AutoSize = true;
            this.lblvantay.BackColor = System.Drawing.SystemColors.Control;
            this.lblvantay.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblvantay.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.lblvantay.Location = new System.Drawing.Point(652, 261);
            this.lblvantay.Name = "lblvantay";
            this.lblvantay.Size = new System.Drawing.Size(131, 13);
            this.lblvantay.TabIndex = 260;
            this.lblvantay.Text = "[F12] Lấy dấu vân tay";
            this.lblvantay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lblvantay.Visible = false;
            // 
            // lbipmay
            // 
            this.lbipmay.ForeColor = System.Drawing.Color.Navy;
            this.lbipmay.Location = new System.Drawing.Point(65, 413);
            this.lbipmay.Name = "lbipmay";
            this.lbipmay.Size = new System.Drawing.Size(46, 13);
            this.lbipmay.TabIndex = 229;
            this.lbipmay.Text = "IP Máy :";
            this.lbipmay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // finger
            // 
            this.finger.AutoSize = true;
            this.finger.BackColor = System.Drawing.SystemColors.Control;
            this.finger.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.finger.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.finger.Location = new System.Drawing.Point(700, 244);
            this.finger.Name = "finger";
            this.finger.Size = new System.Drawing.Size(67, 13);
            this.finger.TabIndex = 259;
            this.finger.Text = "Fingerprint";
            this.finger.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.finger.Visible = false;
            // 
            // label44
            // 
            this.label44.ForeColor = System.Drawing.Color.Navy;
            this.label44.Location = new System.Drawing.Point(50, 384);
            this.label44.Name = "label44";
            this.label44.Size = new System.Drawing.Size(63, 13);
            this.label44.TabIndex = 229;
            this.label44.Text = "Mã số thuế:";
            this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // ptb
            // 
            this.ptb.BackColor = System.Drawing.SystemColors.Control;
            this.ptb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.ptb.ErrorImage = null;
            this.ptb.Image = ((System.Drawing.Image)(resources.GetObject("ptb.Image")));
            this.ptb.InitialImage = ((System.Drawing.Image)(resources.GetObject("ptb.InitialImage")));
            this.ptb.Location = new System.Drawing.Point(700, 153);
            this.ptb.Name = "ptb";
            this.ptb.Size = new System.Drawing.Size(65, 87);
            this.ptb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.ptb.TabIndex = 258;
            this.ptb.TabStop = false;
            this.ptb.Visible = false;
            // 
            // label40
            // 
            this.label40.ForeColor = System.Drawing.Color.Navy;
            this.label40.Location = new System.Drawing.Point(222, 385);
            this.label40.Name = "label40";
            this.label40.Size = new System.Drawing.Size(70, 13);
            this.label40.TabIndex = 229;
            this.label40.Text = "Số tài khoản:";
            this.label40.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_macc
            // 
            this.lbl_macc.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_macc.Location = new System.Drawing.Point(452, 58);
            this.lbl_macc.Name = "lbl_macc";
            this.lbl_macc.Size = new System.Drawing.Size(79, 13);
            this.lbl_macc.TabIndex = 227;
            this.lbl_macc.Text = "Mã công chức:";
            this.lbl_macc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lbl_macc.Visible = false;
            // 
            // label41
            // 
            this.label41.AutoSize = true;
            this.label41.ForeColor = System.Drawing.Color.DarkBlue;
            this.label41.Location = new System.Drawing.Point(417, 58);
            this.label41.Name = "label41";
            this.label41.Size = new System.Drawing.Size(29, 13);
            this.label41.TabIndex = 227;
            this.label41.Text = "Năm";
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.picNhanVien);
            this.groupBox2.Controls.Add(this.butChonHinh);
            this.groupBox2.ForeColor = System.Drawing.Color.DarkBlue;
            this.groupBox2.Location = new System.Drawing.Point(678, 1);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(107, 145);
            this.groupBox2.TabIndex = 225;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Hình ";
            // 
            // picNhanVien
            // 
            this.picNhanVien.Location = new System.Drawing.Point(8, 18);
            this.picNhanVien.Name = "picNhanVien";
            this.picNhanVien.Size = new System.Drawing.Size(91, 93);
            this.picNhanVien.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.picNhanVien.TabIndex = 128;
            this.picNhanVien.TabStop = false;
            // 
            // cboChinhtri
            // 
            this.cboChinhtri.BackColor = System.Drawing.Color.White;
            this.cboChinhtri.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboChinhtri.Enabled = false;
            this.cboChinhtri.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboChinhtri.ForeColor = System.Drawing.Color.Navy;
            this.cboChinhtri.Location = new System.Drawing.Point(624, 355);
            this.cboChinhtri.Name = "cboChinhtri";
            this.cboChinhtri.Size = new System.Drawing.Size(131, 22);
            this.cboChinhtri.TabIndex = 224;
            // 
            // label38
            // 
            this.label38.ForeColor = System.Drawing.Color.Navy;
            this.label38.Location = new System.Drawing.Point(572, 359);
            this.label38.Name = "label38";
            this.label38.Size = new System.Drawing.Size(50, 13);
            this.label38.TabIndex = 223;
            this.label38.Text = "Chính trị:";
            this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label37
            // 
            this.label37.ForeColor = System.Drawing.Color.DarkBlue;
            this.label37.Location = new System.Drawing.Point(581, 309);
            this.label37.Name = "label37";
            this.label37.Size = new System.Drawing.Size(41, 13);
            this.label37.TabIndex = 221;
            this.label37.Text = "Vi tính:";
            this.label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // vitinh
            // 
            this.vitinh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.vitinh.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.vitinh.Enabled = false;
            this.vitinh.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.vitinh.ForeColor = System.Drawing.Color.Navy;
            this.vitinh.Location = new System.Drawing.Point(624, 304);
            this.vitinh.Name = "vitinh";
            this.vitinh.Size = new System.Drawing.Size(131, 22);
            this.vitinh.TabIndex = 220;
            // 
            // label36
            // 
            this.label36.ForeColor = System.Drawing.Color.Navy;
            this.label36.Location = new System.Drawing.Point(548, 334);
            this.label36.Name = "label36";
            this.label36.Size = new System.Drawing.Size(74, 13);
            this.label36.TabIndex = 219;
            this.label36.Text = "Ngoại ngữ  2 :";
            this.label36.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // ngoaingu2
            // 
            this.ngoaingu2.BackColor = System.Drawing.SystemColors.HighlightText;
            this.ngoaingu2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.ngoaingu2.Enabled = false;
            this.ngoaingu2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ngoaingu2.ForeColor = System.Drawing.Color.Navy;
            this.ngoaingu2.Location = new System.Drawing.Point(624, 329);
            this.ngoaingu2.Name = "ngoaingu2";
            this.ngoaingu2.Size = new System.Drawing.Size(131, 22);
            this.ngoaingu2.TabIndex = 218;
            // 
            // dtpNgayCapCMND
            // 
            this.dtpNgayCapCMND.BackColor = System.Drawing.SystemColors.HighlightText;
            this.dtpNgayCapCMND.Enabled = false;
            this.dtpNgayCapCMND.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dtpNgayCapCMND.ForeColor = System.Drawing.Color.Navy;
            this.dtpNgayCapCMND.Location = new System.Drawing.Point(431, 279);
            this.dtpNgayCapCMND.Mask = "00/00/0000";
            this.dtpNgayCapCMND.Name = "dtpNgayCapCMND";
            this.dtpNgayCapCMND.Size = new System.Drawing.Size(108, 23);
            this.dtpNgayCapCMND.TabIndex = 30;
            this.dtpNgayCapCMND.ValidatingType = typeof(System.DateTime);
            this.dtpNgayCapCMND.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dtpNgayCapCMND_KeyDown);
            this.dtpNgayCapCMND.Validated += new System.EventHandler(this.dtpNgayCapCMND_Validated);
            // 
            // dtpNgaySinh
            // 
            this.dtpNgaySinh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.dtpNgaySinh.Enabled = false;
            this.dtpNgaySinh.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dtpNgaySinh.ForeColor = System.Drawing.Color.Navy;
            this.dtpNgaySinh.Location = new System.Drawing.Point(478, 129);
            this.dtpNgaySinh.Mask = "00/00/0000";
            this.dtpNgaySinh.Name = "dtpNgaySinh";
            this.dtpNgaySinh.Size = new System.Drawing.Size(80, 23);
            this.dtpNgaySinh.TabIndex = 15;
            this.dtpNgaySinh.ValidatingType = typeof(System.DateTime);
            this.dtpNgaySinh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dtpNgaySinh_KeyDown);
            this.dtpNgaySinh.Validated += new System.EventHandler(this.dtpNgaySinh_Validated);
            // 
            // txtNgayBN
            // 
            this.txtNgayBN.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txtNgayBN.Enabled = false;
            this.txtNgayBN.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtNgayBN.ForeColor = System.Drawing.Color.Navy;
            this.txtNgayBN.Location = new System.Drawing.Point(115, 54);
            this.txtNgayBN.Mask = "00/00/0000";
            this.txtNgayBN.Name = "txtNgayBN";
            this.txtNgayBN.Size = new System.Drawing.Size(78, 23);
            this.txtNgayBN.TabIndex = 5;
            this.txtNgayBN.ValidatingType = typeof(System.DateTime);
            this.txtNgayBN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNgayBN_KeyDown);
            this.txtNgayBN.Validated += new System.EventHandler(this.txtNgayBN_Validated);
            // 
            // tabPage2
            // 
            this.tabPage2.Controls.Add(this.dataGrid1);
            this.tabPage2.Controls.Add(this.panel8);
            this.tabPage2.ImageIndex = 7;
            this.tabPage2.Location = new System.Drawing.Point(4, 34);
            this.tabPage2.Name = "tabPage2";
            this.tabPage2.Size = new System.Drawing.Size(782, 423);
            this.tabPage2.TabIndex = 1;
            this.tabPage2.Text = "Danh sách";
            this.tabPage2.UseVisualStyleBackColor = true;
            // 
            // dataGrid1
            // 
            this.dataGrid1.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.dataGrid1.BackColor = System.Drawing.Color.WhiteSmoke;
            this.dataGrid1.BackgroundColor = System.Drawing.SystemColors.Control;
            this.dataGrid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.dataGrid1.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.dataGrid1.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.dataGrid1.CaptionVisible = false;
            this.dataGrid1.DataMember = "";
            this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataGrid1.FlatMode = true;
            this.dataGrid1.Font = new System.Drawing.Font("Tahoma", 8F);
            this.dataGrid1.ForeColor = System.Drawing.Color.MidnightBlue;
            this.dataGrid1.GridLineColor = System.Drawing.Color.Gainsboro;
            this.dataGrid1.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.dataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.dataGrid1.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.dataGrid1.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.dataGrid1.LinkColor = System.Drawing.Color.Teal;
            this.dataGrid1.Location = new System.Drawing.Point(0, 32);
            this.dataGrid1.Name = "dataGrid1";
            this.dataGrid1.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.dataGrid1.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.dataGrid1.RowHeaderWidth = 10;
            this.dataGrid1.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.dataGrid1.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.dataGrid1.Size = new System.Drawing.Size(782, 391);
            this.dataGrid1.TabIndex = 0;
            this.dataGrid1.CurrentCellChanged += new System.EventHandler(this.dataGrid1_CurrentCellChanged);
            // 
            // panel8
            // 
            this.panel8.Controls.Add(this.cbpBP_loc);
            this.panel8.Controls.Add(this.txtTimnhanh);
            this.panel8.Controls.Add(this.label42);
            this.panel8.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel8.Location = new System.Drawing.Point(0, 0);
            this.panel8.Name = "panel8";
            this.panel8.Size = new System.Drawing.Size(782, 32);
            this.panel8.TabIndex = 2;
            // 
            // cbpBP_loc
            // 
            this.cbpBP_loc.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbpBP_loc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.cbpBP_loc.FormattingEnabled = true;
            this.cbpBP_loc.Location = new System.Drawing.Point(77, 6);
            this.cbpBP_loc.Name = "cbpBP_loc";
            this.cbpBP_loc.Size = new System.Drawing.Size(292, 24);
            this.cbpBP_loc.TabIndex = 94;
            this.cbpBP_loc.SelectedIndexChanged += new System.EventHandler(this.cbpBP_loc_SelectedIndexChanged);
            // 
            // txtTimnhanh
            // 
            this.txtTimnhanh.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTimnhanh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.txtTimnhanh.Location = new System.Drawing.Point(375, 5);
            this.txtTimnhanh.Name = "txtTimnhanh";
            this.txtTimnhanh.Size = new System.Drawing.Size(398, 22);
            this.txtTimnhanh.TabIndex = 93;
            this.txtTimnhanh.Text = "Tìm nhanh";
            this.txtTimnhanh.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtTimnhanh.TextChanged += new System.EventHandler(this.txtTimnhanh_TextChanged);
            this.txtTimnhanh.MouseMove += new System.Windows.Forms.MouseEventHandler(this.txtTimnhanh_MouseMove);
            this.txtTimnhanh.Leave += new System.EventHandler(this.txtTimnhanh_Leave);
            this.txtTimnhanh.Enter += new System.EventHandler(this.txtTimnhanh_Enter);
            // 
            // label42
            // 
            this.label42.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.label42.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label42.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.label42.Location = new System.Drawing.Point(6, 8);
            this.label42.Name = "label42";
            this.label42.Size = new System.Drawing.Size(70, 16);
            this.label42.TabIndex = 43;
            this.label42.Text = "Xem theo :";
            this.label42.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // ilsIcons32
            // 
            this.ilsIcons32.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilsIcons32.ImageStream")));
            this.ilsIcons32.TransparentColor = System.Drawing.Color.Transparent;
            this.ilsIcons32.Images.SetKeyName(0, "");
            this.ilsIcons32.Images.SetKeyName(1, "");
            this.ilsIcons32.Images.SetKeyName(2, "");
            this.ilsIcons32.Images.SetKeyName(3, "");
            this.ilsIcons32.Images.SetKeyName(4, "");
            this.ilsIcons32.Images.SetKeyName(5, "SMS.ICO");
            this.ilsIcons32.Images.SetKeyName(6, "ManageAddress.gif");
            this.ilsIcons32.Images.SetKeyName(7, "ManageUser.gif");
            this.ilsIcons32.Images.SetKeyName(8, "education.ico");
            // 
            // panel6
            // 
            this.panel6.Controls.Add(this.butEdit);
            this.panel6.Controls.Add(this.butXem);
            this.panel6.Controls.Add(this.butTim);
            this.panel6.Controls.Add(this.butCancel);
            this.panel6.Controls.Add(this.butTruoc);
            this.panel6.Controls.Add(this.butThem);
            this.panel6.Controls.Add(this.butHuy);
            this.panel6.Controls.Add(this.txtTSo);
            this.panel6.Controls.Add(this.butTiep);
            this.panel6.Controls.Add(this.butSau);
            this.panel6.Controls.Add(this.butKetThuc);
            this.panel6.Controls.Add(this.label27);
            this.panel6.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel6.Location = new System.Drawing.Point(0, 539);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(790, 32);
            this.panel6.TabIndex = 85;
            // 
            // toolStrip3
            // 
            this.toolStrip3.AutoSize = false;
            this.toolStrip3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripLabel3});
            this.toolStrip3.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStrip3.Location = new System.Drawing.Point(0, 0);
            this.toolStrip3.Name = "toolStrip3";
            this.toolStrip3.Size = new System.Drawing.Size(790, 39);
            this.toolStrip3.TabIndex = 86;
            this.toolStrip3.Text = "toolStrip3";
            // 
            // toolStripLabel3
            // 
            this.toolStripLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.toolStripLabel3.Font = new System.Drawing.Font("Tahoma", 15F, System.Drawing.FontStyle.Bold);
            this.toolStripLabel3.ForeColor = System.Drawing.Color.White;
            this.toolStripLabel3.Name = "toolStripLabel3";
            this.toolStripLabel3.Size = new System.Drawing.Size(211, 36);
            this.toolStripLabel3.Text = "LÝ LỊCH NHÂN VIÊN";
            // 
            // toolStrip2
            // 
            this.toolStrip2.BackColor = System.Drawing.SystemColors.Control;
            this.toolStrip2.ImageScalingSize = new System.Drawing.Size(32, 32);
            this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tmn_congtac,
            this.toolStripSeparator7,
            this.tmn_daotao,
            this.toolStripSeparator4,
            this.tmn_hopdong,
            this.toolStripSeparator8,
            this.tmn_giacanh,
            this.toolStripSeparator6,
            this.tmn_nuocngoai,
            this.toolStripSeparator1,
            this.tmn_capso,
            this.toolStripSeparator2,
            this.tmn_suckhoe,
            this.toolStripSeparator3,
            this.tmn_doanthe,
            this.toolStripSeparator5});
            this.toolStrip2.Location = new System.Drawing.Point(0, 39);
            this.toolStrip2.Name = "toolStrip2";
            this.toolStrip2.Size = new System.Drawing.Size(790, 39);
            this.toolStrip2.TabIndex = 87;
            this.toolStrip2.Text = "toolStrip2";
            // 
            // tmn_congtac
            // 
            this.tmn_congtac.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_congtac.ForeColor = System.Drawing.Color.Blue;
            this.tmn_congtac.Image = ((System.Drawing.Image)(resources.GetObject("tmn_congtac.Image")));
            this.tmn_congtac.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_congtac.Name = "tmn_congtac";
            this.tmn_congtac.Size = new System.Drawing.Size(86, 36);
            this.tmn_congtac.Text = "&Công tác";
            this.tmn_congtac.Click += new System.EventHandler(this.lblCT_Click);
            // 
            // toolStripSeparator7
            // 
            this.toolStripSeparator7.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator7.Name = "toolStripSeparator7";
            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_daotao
            // 
            this.tmn_daotao.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_daotao.ForeColor = System.Drawing.Color.Blue;
            this.tmn_daotao.Image = ((System.Drawing.Image)(resources.GetObject("tmn_daotao.Image")));
            this.tmn_daotao.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_daotao.Name = "tmn_daotao";
            this.tmn_daotao.Size = new System.Drawing.Size(82, 36);
            this.tmn_daotao.Text = "&Đào tạo";
            this.tmn_daotao.ToolTipText = "Nhấn F3 để xem";
            this.tmn_daotao.Click += new System.EventHandler(this.lblDT_Click);
            // 
            // toolStripSeparator4
            // 
            this.toolStripSeparator4.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator4.Name = "toolStripSeparator4";
            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_hopdong
            // 
            this.tmn_hopdong.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_hopdong.ForeColor = System.Drawing.Color.Blue;
            this.tmn_hopdong.Image = ((System.Drawing.Image)(resources.GetObject("tmn_hopdong.Image")));
            this.tmn_hopdong.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_hopdong.Name = "tmn_hopdong";
            this.tmn_hopdong.Size = new System.Drawing.Size(89, 36);
            this.tmn_hopdong.Text = "H&ợp đồng";
            this.tmn_hopdong.ToolTipText = "Nhấn F5 để xem";
            this.tmn_hopdong.Click += new System.EventHandler(this.lblHD_Click);
            // 
            // toolStripSeparator8
            // 
            this.toolStripSeparator8.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator8.Name = "toolStripSeparator8";
            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_giacanh
            // 
            this.tmn_giacanh.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_giacanh.ForeColor = System.Drawing.Color.Blue;
            this.tmn_giacanh.Image = ((System.Drawing.Image)(resources.GetObject("tmn_giacanh.Image")));
            this.tmn_giacanh.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_giacanh.Name = "tmn_giacanh";
            this.tmn_giacanh.Size = new System.Drawing.Size(84, 36);
            this.tmn_giacanh.Text = "Gia cảnh";
            this.tmn_giacanh.Click += new System.EventHandler(this.lblGC_Click);
            // 
            // toolStripSeparator6
            // 
            this.toolStripSeparator6.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator6.Name = "toolStripSeparator6";
            this.toolStripSeparator6.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_nuocngoai
            // 
            this.tmn_nuocngoai.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_nuocngoai.ForeColor = System.Drawing.Color.Blue;
            this.tmn_nuocngoai.Image = ((System.Drawing.Image)(resources.GetObject("tmn_nuocngoai.Image")));
            this.tmn_nuocngoai.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_nuocngoai.Name = "tmn_nuocngoai";
            this.tmn_nuocngoai.Size = new System.Drawing.Size(97, 36);
            this.tmn_nuocngoai.Text = "Nước ngoài";
            this.tmn_nuocngoai.Click += new System.EventHandler(this.lblNN_Click);
            // 
            // toolStripSeparator1
            // 
            this.toolStripSeparator1.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_capso
            // 
            this.tmn_capso.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_capso.ForeColor = System.Drawing.Color.Blue;
            this.tmn_capso.Image = ((System.Drawing.Image)(resources.GetObject("tmn_capso.Image")));
            this.tmn_capso.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_capso.Name = "tmn_capso";
            this.tmn_capso.Size = new System.Drawing.Size(76, 36);
            this.tmn_capso.Text = "Cấp sổ";
            this.tmn_capso.Click += new System.EventHandler(this.lblCS_Click);
            // 
            // toolStripSeparator2
            // 
            this.toolStripSeparator2.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator2.Name = "toolStripSeparator2";
            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_suckhoe
            // 
            this.tmn_suckhoe.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tmn_suckhoe.ForeColor = System.Drawing.Color.Blue;
            this.tmn_suckhoe.Image = ((System.Drawing.Image)(resources.GetObject("tmn_suckhoe.Image")));
            this.tmn_suckhoe.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_suckhoe.Name = "tmn_suckhoe";
            this.tmn_suckhoe.Size = new System.Drawing.Size(87, 36);
            this.tmn_suckhoe.Text = "Sức khỏe";
            this.tmn_suckhoe.Click += new System.EventHandler(this.lblSK_Click);
            // 
            // toolStripSeparator3
            // 
            this.toolStripSeparator3.ForeColor = System.Drawing.Color.Blue;
            this.toolStripSeparator3.Name = "toolStripSeparator3";
            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 39);
            // 
            // tmn_doanthe
            // 
            this.tmn_doanthe.ForeColor = System.Drawing.Color.Blue;
            this.tmn_doanthe.Image = ((System.Drawing.Image)(resources.GetObject("tmn_doanthe.Image")));
            this.tmn_doanthe.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tmn_doanthe.Name = "tmn_doanthe";
            this.tmn_doanthe.Size = new System.Drawing.Size(91, 36);
            this.tmn_doanthe.Text = "Đoàn thể";
            this.tmn_doanthe.Click += new System.EventHandler(this.lblDThe_Click_1);
            // 
            // toolStripSeparator5
            // 
            this.toolStripSeparator5.Name = "toolStripSeparator5";
            this.toolStripSeparator5.Size = new System.Drawing.Size(6, 39);
            // 
            // printPreviewDialog1
            // 
            this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
            this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
            this.printPreviewDialog1.Enabled = true;
            this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
            this.printPreviewDialog1.Name = "printPreviewDialog1";
            this.printPreviewDialog1.Visible = false;
            // 
            // pBarcode
            // 
            this.pBarcode.Location = new System.Drawing.Point(451, 474);
            this.pBarcode.Name = "pBarcode";
            this.pBarcode.Size = new System.Drawing.Size(100, 50);
            this.pBarcode.TabIndex = 82;
            this.pBarcode.TabStop = false;
            // 
            // frmLyLichNV
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.ClientSize = new System.Drawing.Size(790, 571);
            this.Controls.Add(this.tabllnv);
            this.Controls.Add(this.toolStrip2);
            this.Controls.Add(this.toolStrip3);
            this.Controls.Add(this.panel6);
            this.Controls.Add(this.label30);
            this.Controls.Add(this.label28);
            this.Controls.Add(this.label33);
            this.Controls.Add(this.cboNgoaingu3);
            this.Controls.Add(this.cboNgoaingu2);
            this.Controls.Add(this.cboNgoaingu4);
            this.Controls.Add(this.pBarcode);
            this.Controls.Add(this.groupBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.KeyPreview = true;
            this.MaximizeBox = false;
            this.Name = "frmLyLichNV";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = " ";
            this.Load += new System.EventHandler(this.frmLyLichNV_Load);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmLyLichNV_KeyDown);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.tabllnv.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            this.tabPage1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ptb)).EndInit();
            this.groupBox2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.picNhanVien)).EndInit();
            this.tabPage2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
            this.panel8.ResumeLayout(false);
            this.panel8.PerformLayout();
            this.panel6.ResumeLayout(false);
            this.panel6.PerformLayout();
            this.toolStrip3.ResumeLayout(false);
            this.toolStrip3.PerformLayout();
            this.toolStrip2.ResumeLayout(false);
            this.toolStrip2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pBarcode)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		private void txtMaSoNV_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{	
			try
			{
				if (e.KeyCode == Keys.Enter)
				{ 
					if (txtMaSoNV.Text.Length < 5)
					{
						txtMaSoNV.Text = txtMaSoNV.Text.PadLeft(5,'0');
					}			
				}
			}
			catch{}
		}
        private void loadHinhVanTay(string manv)
        {
            if (fnhandang == null)
                fnhandang = new FrmNhanDang(ptb);
            ptb.Image = fnhandang.getImageFromMabn(manv);
            if (ptb.Image == null) ma_vantay = manv;
        }
		 void load_LLNV()
		{
			try
			{
				ds=mDB.LyLichNV(txtMaSoNV.Text);
				DataSet dshd=new DataSet();
				dshd=mDB.LyLichNVhd(txtMaSoNV.Text);
				string ma_nv1=txtMaSoNV.Text;				
				DataRow[] r=ds.Tables[0].Select("mnvmay= '"+ma_nv1+"'");				
				DataRow[] rhd=dshd.Tables[0].Select("manv= '"+ma_nv1+"'");
				if(r.Length>0)
				{				
					txtMaBP.Text =r[0]["madv"].ToString();
					cboBoPhan.SelectedValue=txtMaBP.Text;
					txtMaSoNV.Text=r[0]["mnvmay"].ToString();
					if(rhd.Length>0)
					{
						txtChucVu.Text=rhd[0]["macv"].ToString();
						cboChucVu.SelectedValue = txtChucVu.Text;
						txtNgayBN.Text=rhd[0]["m_ngaybn"].ToString();
						txtTGBN.Text=rhd[0]["tgbn"].ToString();
						dtpNgayCongTac.Text=rhd[0]["m_ngaydenct"].ToString();
						cboDang.Text=rhd[0]["dang"].ToString();
						cboChiBo.Text=rhd[0]["chi_bo"].ToString();
						cboDoan.Text=rhd[0]["doan"].ToString();
						cboCongDoan.Text=rhd[0]["cong_doan"].ToString();
					}
					txtHoNV.Text= r[0]["ho"].ToString().Trim();
					txtTenNV.Text =r[0]["ten"].ToString().Trim(); 
					cboPhai.SelectedValue=r[0]["phai"].ToString();
					txtBiDanh.Text=r[0]["bidanh"].ToString(); 				
					txtThuTu.Text=r[0]["stt"].ToString();
                    cboDanToc.SelectedValue = r[0]["madt"].ToString().Trim().Equals("") ? cboDanToc.SelectedIndex = -1 : cboDanToc.SelectedValue = r[0]["madt"].ToString();
                    cboTonGiao.SelectedValue = r[0]["matgiao"].ToString().Trim().Equals("") ? cboTonGiao.SelectedIndex = -1 : cboTonGiao.SelectedValue = r[0]["matgiao"].ToString(); 
					dtpNgaySinh.Text=r[0]["ngaysinh"].ToString();
					txtNguyenQuan.Text=r[0]["quequan"].ToString();
                    cboNguyenQuan.SelectedValue = r[0]["maqg"].ToString().Trim().Equals("") ? cboNguyenQuan.SelectedIndex = -1 : cboNguyenQuan.SelectedValue = r[0]["maqg"].ToString();
					txtNoiSinh.Text=r[0]["noisinh"].ToString(); 
					txtDienThoai.Text=r[0]["dienthoai"].ToString();
					txtThuongTru.Text=r[0]["diachi"].ToString();
                    cboTinhThuongTru.SelectedValue = r[0]["t_diachi"].ToString().Trim().Equals("") ? cboTinhThuongTru.SelectedIndex = -1 : cboTinhThuongTru.SelectedValue = r[0]["t_diachi"].ToString();
					cboTinhThuongTru_SelectionChangeCommitted(null,null);
                    cboQuanThuongTru.SelectedValue = r[0]["h_diachi"].ToString().Trim().Equals("") ? cboQuanThuongTru.SelectedIndex = -1 : cboQuanThuongTru.SelectedValue = r[0]["h_diachi"].ToString();
					txtNoiOHN.Text=r[0]["noio"].ToString();
                    cboTinhOHN.SelectedValue = r[0]["t_noio"].ToString().Trim().Equals("") ? cboTinhOHN.SelectedIndex = -1 : cboTinhOHN.SelectedValue = r[0]["t_noio"].ToString(); 
					cboTinhOHN_SelectionChangeCommitted(null,null);
                    cboQuanOHN.SelectedValue = r[0]["h_noio"].ToString().Trim().Equals("") ? cboQuanOHN.SelectedIndex = -1 : cboQuanOHN.SelectedValue = r[0]["h_noio"].ToString();				
					txtSoCMND.Text=r[0]["cmndso"].ToString(); 
					txtNoiCapCMND.Text=r[0]["noicapcmnd"].ToString();
					dtpNgayCapCMND.Text=r[0]["ngaycapcmnd"].ToString();
                    cboHocVan.SelectedValue = r[0]["mahv"].ToString().Trim().Equals("") ? cboHocVan.SelectedIndex = -1 : cboHocVan.SelectedValue = r[0]["mahv"].ToString();
                    cboNgoaiNgu1.SelectedValue = r[0]["mann"].ToString().Trim().Equals("") ? cboNgoaiNgu1.SelectedIndex = -1 : cboNgoaiNgu1.SelectedValue = r[0]["mann"].ToString();
                    ngoaingu2.SelectedValue = r[0]["mann1"].ToString().Trim().Equals("") ? cboNgoaingu2.SelectedIndex = -1 : cboNgoaingu2.SelectedValue = r[0]["mann1"].ToString();
                    cboNgoaingu3.SelectedValue = r[0]["mann2"].ToString().Trim().Equals("") ? cboNgoaingu3.SelectedIndex = -1 : cboNgoaingu3.SelectedValue = r[0]["mann2"].ToString();
                    cboNgoaingu4.SelectedValue = r[0]["mann3"].ToString().Trim().Equals("") ? cboNgoaingu4.SelectedIndex = -1 : cboNgoaingu4.SelectedValue = r[0]["mann3"].ToString();
                    cboChuyenMon.SelectedValue = r[0]["nnghiep"].ToString().Trim().Equals("") ? cboChuyenMon.SelectedIndex = -1 : cboChuyenMon.SelectedValue = r[0]["nnghiep"].ToString(); 
					txtnamsinh.Text=r[0]["namsinh"].ToString();
					txtCellphone.Text=r[0]["dtdd"].ToString();
					txtMVTat.Text=r[0]["MaVT"].ToString();
                    cboChucdanh.SelectedValue = r[0]["macd"].ToString().Trim().Equals("") ? cboChucdanh.SelectedIndex = -1 : cboChucdanh.SelectedValue = r[0]["macd"].ToString();
                    vitinh.SelectedValue = r[0]["tdth"].ToString().Trim().Equals("") ? vitinh.SelectedIndex = -1 : vitinh.SelectedValue = r[0]["tdth"].ToString();
                    cboChinhtri.SelectedValue = r[0]["chinhtri"].ToString().Trim().Equals("") ? cboChinhtri.SelectedIndex = -1 : cboChinhtri.SelectedValue = r[0]["chinhtri"].ToString();
                    txtSotk.Text = r[0]["sotk"].ToString();
                    txt_masothue.Text = r[0]["msthue"].ToString();
                    txtipmay.Text = r[0]["ip"].ToString();
                    txt_macc.Text = r[0]["macc"].ToString();
                    if (r[0]["nganhang"].ToString()!="")
                     txtNganhang.SelectedValue = r[0]["nganhang"].ToString()!="";//?r[0]["nganhang"].ToString():DBNull.Value;
                    else
                      txtNganhang.SelectedIndex=-1;  
					try
					{
						image = new byte[0];
						image = (byte[])(r[0]["hinhanh"]);
						memo = new MemoryStream(image);
						map = new Bitmap(Image.FromStream(memo));
						picNhanVien.Image = (Bitmap)map;
						picNhanVien.Tag = image;
					}
					catch
					{
						picNhanVien.Tag = "0000.bmp";
						fstr = new System.IO.FileStream(picNhanVien.Tag.ToString(), System.IO.FileMode.Open, System.IO.FileAccess.Read);
						map = new Bitmap(Image.FromStream(fstr));
						picNhanVien.Image = (Bitmap)map;
						image = new byte[fstr.Length];
						fstr.Read(image, 0, System.Convert.ToInt32(fstr.Length));
						fstr.Close();
						picNhanVien.Tag = image;
					}
                    if (bVantay)
                    {
                        loadHinhVanTay(txtMaSoNV.Text);
                    }
					checkCT.Checked=false;lblCT.ForeColor=Color.FromArgb(0,0,255);
					checkDT.Checked=false;lblDT.ForeColor=Color.FromArgb(0,0,255);
					checkHD.Checked=false;lblHD.ForeColor=Color.FromArgb(0,0,255);
					checkGC.Checked=false;lblGC.ForeColor=Color.FromArgb(0,0,255);
					checkNN.Checked=false;lblGC.ForeColor=Color.FromArgb(0,0,255);
					checkCS.Checked=false;lblCS.ForeColor=Color.FromArgb(0,0,255);
					checkSK.Checked=false;lblSK.ForeColor=Color.FromArgb(0,0,255);
					checkDThe.Checked=false;lblDThe.ForeColor=Color.FromArgb(0,0,255);
                    load_ct();
                    load_dt();
                    load_hd();
                    load_gc();
                    load_nn();
                    load_cs();
                    load_sk();
                    load_dthe();
				}
				
			}
			catch(Exception ex){MessageBox.Show(ex.Message);}
		}
		private void load_rong()
		{
			txtMaBP.Text =""; 			cboBoPhan.Text="";	
			txtChucVu.Text = "";        cboChucVu.Text = "";
			txtHoNV.Text= "";			txtTenNV.Text = "";
			cboPhai.Text = "";
			txtBiDanh.Text = ""; 
			txtNgayBN.Text="";
			txtTGBN.Text="";
			txtThuTu.Text ="";
			cboDanToc.SelectedValue = "25"; 
			cboTonGiao.Text = ""; 
			dtpNgaySinh.Text="";
			txtnamsinh.Text="";
			txtNguyenQuan.Text=""; 
			txtNoiSinh.Text=""; 
			txtDienThoai.Text="";
			txtThuongTru.Text="";   cboTinhThuongTru.Text="";	cboQuanThuongTru.Text="";
			txtNoiOHN.Text=""; 		cboTinhOHN.Text="";         cboQuanOHN.Text="";
			txtSoCMND.Text="";		txtNoiCapCMND.Text="";	    dtpNgayCapCMND.Text="";
			dtpNgayCongTac.Text="";	
			cboHocVan.Text = ""; 	cboNgoaiNgu1.Text="";		cboChuyenMon.Text=""; 
			ngoaingu2.Text="";	cboNgoaingu3.Text="";		cboNgoaingu4.Text="";
			cboChucdanh.Text="";
			cboDang.Text=""; 		cboChiBo.Text="";		    cboCongDoan.Text="";cboDoan.Text="";
            cboChinhtri.SelectedIndex = -1;
            txtSotk.Text = "";
            txtNganhang.Text = ""; txt_macc.Text = "0";
		}
        private void Load_TDQLNN()
        {
            cboChinhtri.DisplayMember = "ten";
            cboChinhtri.ValueMember = "ma";
            cboChinhtri.DataSource = mDB.get_tdqlnn().Tables[0];
            cboChinhtri.SelectedIndex = -1;
        }

		private void txtMaSoNV_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{	
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}
		private bool IsNumeric (string strNum)
		{	
			int iNum;
			try
			{
				iNum = int.Parse(strNum);
				return true;
			}
			catch
			{
				return false;
			}
		}

		private void txtMaBP_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			
			if (e.KeyCode==Keys.Enter)
			{
				if	(txtMaBP.Text.Length < 3)
				{
					txtMaBP.Text = txtMaBP.Text.PadLeft(3,'0');
					cboBoPhan.SelectedValue=txtMaBP.Text;
				}
				SendKeys.Send("{Tab}{F4}");
			}
		}

		private void cboBoPhan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				if (cboBoPhan.SelectedIndex == -1)
				{
					cboBoPhan.SelectedIndex = 0;
				}
				txtMaBP.Text = cboBoPhan.SelectedValue.ToString();
				txtChucVu.Focus();
			}
		}

		private void txtChucVu_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				if (txtChucVu.Text.Length < 3 )
				{
					txtChucVu.Text = txtChucVu.Text.PadLeft(3,'0');
					cboChucVu.SelectedValue = txtChucVu.Text;
				}
				SendKeys.Send("{Tab}{F4}");
			}
		}

		private void txtChucVu_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboChucVu_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				txtNgayBN.Focus();
				
			}
		}
		private void txtMVTat_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				txtBiDanh.Focus();
			}
		}

		private void txtHoNV_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				SendKeys.Send("{Tab}");				
			}
		}

		private void txtHoNV_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtHoNV_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			//			if(txtHoNV.TextLength == 0)	
			//				txtHoNV.Focus();
			//			else 
			//			{
			//				txtHoNV.Text=txtHoNV.Text.ToUpper();
			//				//mDB.Caps(txtHoNV.Text.ToString());		
			//				SendKeys.Send("{Tab}");
			//			}
		}

		private void txtTenNV_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				txtMVTat.Focus();
		}

		private void txtTenNV_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboPhai_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				SendKeys.Send("{Tab}");
			}
		}

		private void txtBiDanh_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtBiDanh_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtThuTu_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtThuTu_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboDanToc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void cboTonGiao_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private int kiemtrangay(int dtemp,int y)
		{
			int d=0;			
			switch(dtemp)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:
					d=31;
					break;
				case 2:
					if((y%4)==0)
						d=29;
					else if((y%4)!=0)
						d=28;
					break;
				case 4:
				case 6:
				case 9:
				case 11:
					d=30;
					break;
			}
			return d;
		}
		private void dtpNgaySinh_Validated(object sender, System.EventArgs e)
		{
			try
			{                
                dtpNgaySinh.Text = dtpNgaySinh.Text.Trim();
                if (dtpNgaySinh.Text == "  /  /")
                {
                    return;
                }
                if (dtpNgaySinh.Text.Length == 6) dtpNgaySinh.Text = dtpNgaySinh.Text + DateTime.Now.Year.ToString();
                if (!mDB.kiemtrangayhople(dtpNgaySinh.Text))
                {
                    MessageBox.Show(lan.Change_language_MessageText("Ngày không hợp lệ !"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    dtpNgaySinh.Focus();
                    return;
                }
                if(dtpNgaySinh.Text!="" && dtpNgaySinh.Text!="__/__/____")
				{
					int dd=0,mm=0,yy=0;
					dd=int.Parse(dtpNgaySinh.Text.Substring(0,2));
					mm=int.Parse(dtpNgaySinh.Text.Substring(3,2));
					yy=int.Parse(dtpNgaySinh.Text.Substring(6));
		
					if(int.Parse(Convert.ToString(DateTime.Now.Year-yy))<18)
					{
                        MessageBox.Show(lan.Change_language_MessageText("Chưa đủ 18 tuổi"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
						dtpNgaySinh.Focus();
						return;
					}                    
					if(dtpNgaySinh.Text!="")
					{
						txtnamsinh.Text=Convert.ToString(int.Parse(yy.ToString()));
                        txtNguyenQuan.Focus();
					}	
				}		
			}
			catch{}			
		}

		private void txtNguyenQuan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtNguyenQuan_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}
		private void txtNguyenQuan_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(txtNguyenQuan.TextLength != 0)
				txtNguyenQuan.Text=mDB.Caps(txtNguyenQuan.Text.ToString());
		}

		private void cboNguyenQuan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				if (cboNguyenQuan.SelectedIndex==-1)
					cboNguyenQuan.SelectedValue="01";
				SendKeys.Send("{Tab}");
			}
			txtNoiSinh.Text=txtNguyenQuan.Text;
		}

		private void txtNoiSinh_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtNoiSinh_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtDienThoai_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				SendKeys.Send("{Tab}")   ;
			}
		}

		private void txtDienThoai_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtDienThoai_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			//			if(txtDienThoai.TextLength == 0)
			//			{
			//				txtThuongTru.Focus();
			//				SendKeys.Send("{F4}");
			//			}
			//			else 
			//				txtDienThoai.Text=mDB.Caps(txtDienThoai.Text.ToString());
		}

		private void txtThuongTru_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtThuongTru_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboTinhThuongTru_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
            if (e.KeyCode == Keys.Enter)
			{
				if (cboTinhThuongTru.SelectedIndex==-1)
					cboTinhThuongTru.SelectedValue=mDB.Mabv.Substring(0,3);
				SendKeys.Send("{Tab}{F4}");
			}
		}

		private void cboTinhThuongTru_SelectionChangeCommitted(object sender, System.EventArgs e)
		{
			try
			{
				cboQuanThuongTru.DataSource=mDB.get_data("select * from "+m_user+".btdquan  where matt='"+cboTinhThuongTru.SelectedValue.ToString().Trim()+"'").Tables[0];
				cboQuanThuongTru.ValueMember="maqu";
				cboQuanThuongTru.DisplayMember="tenquan";
			}
			catch{}
		}

		private void cboQuanThuongTru_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			try
			{
				if (e.KeyCode == Keys.Enter)
					SendKeys.Send("{Tab}");
					txtNoiOHN.Text=txtThuongTru.Text;
					cboTinhOHN.SelectedValue=cboTinhThuongTru.SelectedValue.ToString();
					string sql="select * from "+m_user+".btdquan where matt='"+cboTinhOHN.SelectedValue.ToString()+"'";
					cboQuanOHN.DisplayMember="tenquan";
					cboQuanOHN.ValueMember="maqu";
					cboQuanOHN.DataSource=mDB.get_data(sql).Tables[0];
					cboQuanOHN.SelectedValue=cboQuanThuongTru.SelectedValue.ToString();
			}
			catch{}
		}


		private void txtNoiOHN_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtNoiOHN_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtNoiOHN_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{			
			if(txtNoiOHN.TextLength == 0)
			{
				cboTinhOHN.Focus();
				SendKeys.Send("{F4}");
			}
			else 
				txtNoiOHN.Text=mDB.Caps(txtNoiOHN.Text.ToString());	
		}

		private void cboTinhOHN_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				if (cboTinhOHN.SelectedIndex==-1)
					cboTinhOHN.SelectedValue=mDB.Mabv.Substring(0,3);
				SendKeys.Send("{Tab}{F4}");
			}
		}

		private void cboTinhOHN_SelectionChangeCommitted(object sender, System.EventArgs e)
		{
            try
            {
                cboQuanOHN.DataSource = mDB.get_data("select * from " + m_user + ".btdquan  where matt='" + cboTinhOHN.SelectedValue.ToString().Trim() + "'").Tables[0];
                cboQuanOHN.ValueMember = "maqu";
                cboQuanOHN.DisplayMember = "tenquan";
            }
            catch { }
		}

		private void cboQuanOHN_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtSoCMND_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtSoCMND_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtSoCMND_Validated(object sender, System.EventArgs e)
		{
			if(txtSoCMND.Text!="")
			{
				if(txtSoCMND.TextLength!=9)
				{
					MessageBox.Show(lan.Change_language_MessageText("Số CMND phải bằng 9 số"),lan.Change_language_MessageText("Thông báo"));
					txtSoCMND.Focus();
					return;
				}
				txtNoiCapCMND.Focus();
			}
			else
			{
				cboChucdanh.Focus();
				SendKeys.Send("{F4}");
			}
		}

		private void txtSoCMND_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			//			if(txtSoCMND.TextLength == 0)
			//			{
			//				
			//				dtpNgayCongTac.Focus();
			//				SendKeys.Send("{Tab}{F4}");
			//			}
			//			else 
			//				txtSoCMND.Text=mDB.Caps(txtSoCMND.Text.ToString());
		}

		private void txtNoiCapCMND_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtNoiCapCMND_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtNoiCapCMND_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(txtNoiCapCMND.TextLength == 0)
			{
				dtpNgayCapCMND.Focus();
				SendKeys.Send("{F4}");

			}
			else 
				txtNoiCapCMND.Text=mDB.Caps(txtNoiCapCMND.Text.ToString());
		}

		private void dtpNgayCapCMND_Validated(object sender, System.EventArgs e)
		{
			try
			{
                if (!txtSoCMND.Text.Trim().Equals(""))
                {
                    dtpNgayCapCMND.Text = dtpNgayCapCMND.Text.Trim();
                    if (dtpNgayCapCMND.Text == "  /  /")
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng năm cấp CMND"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        dtpNgayCapCMND.Focus();
                        return;
                    }
                    if (dtpNgayCapCMND.Text.Length == 6) dtpNgayCapCMND.Text = dtpNgayCapCMND.Text + DateTime.Now.Year.ToString();
                    if (!mDB.kiemtrangayhople(dtpNgayCapCMND.Text.Trim()))
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng năm không hợp lệ !"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        dtpNgayCapCMND.Focus();
                        return;
                    }
                    if (dtpNgayCapCMND.Text != "" && dtpNgayCapCMND.Text != "__/__/____")
                    {

                        int ddns = 0, mmns = 0, yyns = 0;
                        try
                        {
                            ddns = int.Parse(dtpNgayCapCMND.Text.Substring(0, 2));
                            mmns = int.Parse(dtpNgayCapCMND.Text.Substring(3, 2));
                            yyns = int.Parse(dtpNgayCapCMND.Text.Substring(6, 4));
                        }
                        catch { }
                        int yy = 0;
                        yy = int.Parse(txtnamsinh.Text.Trim());
                        int ytemp = 0;
                        ytemp = yy + 13;
                        DateTime tg = DateTime.Now;

                        try
                        {
                            if (yyns <= ytemp)
                            {
                                MessageBox.Show(lan.Change_language_MessageText("Năm sinh phải nhỏ hơn ngày cấp CMND và đủ 14 tuổi trở lên"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                                dtpNgayCapCMND.Focus();
                                return;
                            }
                        }
                        catch { }
                    }
                }
			}
			catch{}				
		}

		private void dtpNgayCongTac_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void dtpNgayCongTac_Validated(object sender, System.EventArgs e)
		{
			try
			{
				if(dtpNgayCongTac.Text!="" && dtpNgayCongTac.Text!="__/__/____")
				{
					if(dtpNgayCongTac.Text.IndexOf("_")>0 && dtpNgayCongTac.Text!="")
					{
						MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng năm công tác"),lan.Change_language_MessageText("Thông báo"));
						dtpNgayCongTac.Focus();
						return ;
					}
					int dd=0,mm=0,yy=0;

					int ddns=0,mmns=0,yyns=0;				
					try
					{					
						ddns=int.Parse(dtpNgayCapCMND.Text.Substring(0,2));
						mmns=int.Parse(dtpNgayCapCMND.Text.Substring(3,2));
						yyns=int.Parse(dtpNgayCapCMND.Text.Substring(6,4));
					}
					catch{}

					dd=int.Parse(dtpNgayCongTac.Text.Substring(0,2));
					mm=int.Parse(dtpNgayCongTac.Text.Substring(3,2));
					yy=int.Parse(dtpNgayCongTac.Text.Substring(6));
				
					if(yy<yyns)
					{
						MessageBox.Show(lan.Change_language_MessageText("Ngày đến công tác phải lớn hơn năm sinh và lớn hơn hay bằng ngày cấp cmnd"),lan.Change_language_MessageText("Thông báo"));
						dtpNgayCongTac.Focus();
						return;
					}
					if(dd<=0 || dd >31)
					{
						MessageBox.Show(lan.Change_language_MessageText("Nhập ngày công tác không hợp lệ"),lan.Change_language_MessageText("Thông báo"));
						dtpNgayCongTac.Focus();
						return;
					}
					if(mm<=0 || mm>12)
					{
						MessageBox.Show(lan.Change_language_MessageText("Nhập ngày công tác không hợp lệ"),lan.Change_language_MessageText("Thông báo"));
						dtpNgayCongTac.Focus();
						return;
					}
					if(dd > kiemtrangay(mm,yy))
					{
						MessageBox.Show(lan.Change_language_MessageText("Nhập ngày công tác không hợp lệ"),lan.Change_language_MessageText("Thông báo"));
						dtpNgayCongTac.Focus();
						return;
					}
				}
			}
			catch{}
		}

		private void cboHocVan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void cboNgoaiNgu_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void cboChuyenMon_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				if(cboChuyenMon.SelectedIndex==-1)
					cboChuyenMon.SelectedIndex=0;				
				cboDang.Focus();
			}
		}

		private void cboDang_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void cboDang_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;			
		}

		private void cboDang_Validated(object sender, System.EventArgs e)
		{
            if (cboDang.Text.ToUpper() != "R" || cboDang.Text.ToUpper() != "C")
				if(cboDang.Text!="") 
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập vào đảng R/r(rồi) hay C/c(chưa) hay rỗng"),lan.Change_language_MessageText("Thông báo"));					
					cboDang.Focus();
				}
		}

		private void cboChiBo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)			
				SendKeys.Send("{Tab}{F4}");			
		}

		private void cboChiBo_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled=true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboDoan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)			
				SendKeys.Send("{Tab}{F4}");	
		}

		private void cboDoan_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;			
		}

		private void cboDoan_Validated(object sender, System.EventArgs e)
		{
            if (cboDoan.Text.ToUpper() != "R" || cboDoan.Text.ToUpper() != "C")
				if(cboDoan.Text!="") 
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập vào đoàn R/r(rồi) hay C/c(chưa) hay rỗng"),lan.Change_language_MessageText("Thông báo"));					
					cboDoan.Focus();
				}
		}

		private void cboCongDoan_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void cboCongDoan_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;			
		}

		private void cboCongDoan_Validated(object sender, System.EventArgs e)
		{
            if (cboCongDoan.Text.ToUpper() != "R" || cboCongDoan.Text.ToUpper() != "C")
				if(cboCongDoan.Text!="") 
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập vào công đoàn R/r(rồi) hay C/c(chưa) hay rỗng"),lan.Change_language_MessageText("Thông báo"));					
					cboCongDoan.Focus();
				}
		}

		private void butChonHinh_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}
		private void txtMVTat_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void butChonHinh_Click(object sender, System.EventArgs e)
		{
			
			string sDir = System.Environment.CurrentDirectory.ToString();
			OpenFileDialog of = new OpenFileDialog();
			of.Title = "Chọn hình";
			of.Filter = "Files (*.bmp)|*.bmp|All Files (*.*)|*.*";
			of.RestoreDirectory = true;
			if (of.ShowDialog() == DialogResult.OK)
			{
			    picNhanVien.Tag = of.FileName;
			    fstr = new System.IO.FileStream(picNhanVien.Tag.ToString(), System.IO.FileMode.Open, System.IO.FileAccess.Read);
			    image = new byte[fstr.Length];
			    fstr.Read(image, 0, System.Convert.ToInt32(fstr.Length));
			    picNhanVien.Tag = image;
			    map = new Bitmap(Image.FromStream(fstr));
			    picNhanVien.Image = (Bitmap)map;
			    fstr.Close();
			}
			System.Environment.CurrentDirectory = sDir;
		}

		private void butTruoc_Click(object sender, System.EventArgs e)
		{			
			this.BindingContext[dsllnv.Tables[0]].Position -= 1;
            dataGrid1.Refresh();
		}

		private void butSau_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[dsllnv.Tables[0]].Position += 1;
            this.Update();	
		}
		private void butTiep_Click(object sender, System.EventArgs e)
		{
            tabllnv.TabPages[0].Show();
            txtMaSoNV.Text = "";
            int a = 0;
            try
            {
                a = int.Parse(mDB.get_data("select nextval('nhansu.max_manv') as m  from " + mDB.user + ".max_manv ").Tables[0].Rows[0]["m"].ToString());
                a += 1;
            }
            catch
            {
                a = 1;
            }
            
            txtMaSoNV.Text = a.ToString().PadLeft(5, '0');
            enable_ctl(true);
            //if (barcode.Visible) barcode.Text = txtMaSoNV.Text;
            Load_Them();
            txtMaBP.Focus();
            enable_but(false);
		}
        void enable_but(bool ena)
        {
            butTruoc.Enabled = ena;
            butSau.Enabled = ena;
            butThem.Enabled = !ena;
            butTiep.Enabled = ena;
            butTim.Enabled = ena;
            butKetThuc.Enabled = ena;
            butCancel.Enabled = !ena;
            butEdit.Enabled = ena;
            butHuy.Enabled = ena;
            butXem.Enabled = ena;         
        }
        void enable_ctl(bool ena)
        {
            txtnamsinh.Enabled = ena;
            txtipmay.Enabled = ena;
            txtNgayBN.Enabled = ena;// "";
            txtTGBN.Enabled = ena;// "0";
            
            cboPhai.Enabled = ena;//;
            cboDanToc.Enabled = ena;
            cboTonGiao.Enabled = ena;//;
            
            cboPhai.Enabled = ena;//;
            cboTonGiao.Enabled = ena;//;
            txtMaBP.Enabled = ena;
            cboBoPhan.Enabled = ena;
            txtChucVu.Enabled = ena;
            cboChucVu.Enabled = ena;
            cboPhai.Enabled = ena;
            dtpNgaySinh.Enabled = ena;
            cboNguyenQuan.Enabled = ena;
            cboTinhThuongTru.Enabled = ena;
            cboQuanThuongTru.Enabled = ena;
            cboTinhOHN.Enabled = ena;
            cboQuanOHN.Enabled = ena;
            dtpNgayCapCMND.Enabled = ena;
            
            cboChucdanh.Enabled = ena;//;
            txtMaBP.Enabled = ena;// "";
            txtChucVu.Enabled = ena;// "";
            txtHoNV.Enabled = ena;// "";
            txtTenNV.Enabled = ena;// "";
            txtBiDanh.Enabled = ena;// "";
            txtThuTu.Enabled = ena;// txtMaSoNV.Text.Trim();
            txtNguyenQuan.Enabled = ena;// "";
            txtNoiSinh.Enabled = ena;// "";
            txtDienThoai.Enabled = ena;// "";
            txtCellphone.Enabled = ena;// "";
            
            txtThuongTru.Enabled = ena;// "";
            txtNoiOHN.Enabled = ena;// "";
            txtSoCMND.Enabled = ena;// "";
            txtNoiCapCMND.Enabled = ena;// "";
            picNhanVien.Enabled = ena;
            
            txtMVTat.Enabled = ena;// "";
            txtSotk.Enabled = ena;// "";
            txtNganhang.Enabled = ena;
            txt_masothue.Enabled = ena;
            if (txt_macc.Visible == true)
            {
                txt_macc.Enabled = ena;
            }
        }
		private void Load_Them()
		{
            ptb.Image = null;           
            txtnamsinh.Text="";
			txtNgayBN.Text="";
			txtTGBN.Text="0";
			cboHocVan.SelectedIndex = -1;		
			cboChuyenMon.SelectedIndex=-1;			
			cboPhai.SelectedIndex = -1;			
			cboDanToc.SelectedValue="25";			
			cboTonGiao.SelectedIndex = -1;
			cboHocVan.SelectedIndex = -1;		
			cboChuyenMon.SelectedIndex=-1;			
			cboPhai.SelectedIndex = -1;			
			cboTonGiao.SelectedIndex = -1;
			txtMaBP.Text="";
			cboBoPhan.SelectedIndex=-1;
			cboBoPhan.SelectedIndex=-1;
			txtChucVu.Text="";
			cboChucVu.SelectedIndex=-1;
			cboPhai.SelectedIndex=-1;
			dtpNgaySinh.Text = "";
			cboNguyenQuan.SelectedIndex = -1;
			cboTinhThuongTru.SelectedValue=mDB.Mabv.Substring(0,3);
			cboQuanThuongTru.SelectedIndex = -1;
			cboTinhOHN.SelectedValue=mDB.Mabv.Substring(0,3);
			cboQuanOHN.SelectedIndex = -1;
			dtpNgayCapCMND.Text ="";
			dtpNgayCongTac.Text="";			
			cboNgoaiNgu1.SelectedIndex = -1;
            ngoaingu2.SelectedIndex = -1;
            cboChinhtri.SelectedIndex = -1;
			cboNgoaiNgu1.Text="";
			cboNgoaingu2.SelectedIndex=-1;
			cboNgoaingu2.Text="";
			cboNgoaingu3.SelectedIndex=-1;
			cboNgoaingu3.Text="";
			cboNgoaingu4.SelectedIndex=-1;
			cboNgoaingu4.Text="";
			cboHocVan.SelectedIndex=-1;
			cboChuyenMon.SelectedIndex = -1;			
			cboChucdanh.SelectedIndex=-1;
			txtMaBP.Text="";
			txtChucVu.Text="";
			txtHoNV.Text= "";
			txtTenNV.Text = "";
			txtBiDanh.Text = "";
			txtThuTu.Text = txtMaSoNV.Text.Trim();
			txtNguyenQuan.Text="";
			txtNoiSinh.Text="";
			txtDienThoai.Text="";
			txtCellphone.Text="";
			txtThuongTru.Text="";
			txtNoiOHN.Text="";
			txtSoCMND.Text="";
			txtNoiCapCMND.Text="";
			picNhanVien.Image=null;
			picNhanVien.Tag="";				
			cboDang.Text="";
			cboChiBo.Text="";
			cboDoan.Text="";
			cboCongDoan.Text="";
            txtMVTat.Text = "";
            txtSotk.Text = "";
            txt_masothue.Text = "0";
            txtNganhang.Text = "";
            if (txt_macc.Visible == true)
            {
                txt_macc.Text = "0";
            }
			checkCT.Checked=false;lblCT.ForeColor=Color.FromArgb(0,0,255);
			checkDT.Checked=false;lblDT.ForeColor=Color.FromArgb(0,0,255);
			checkHD.Checked=false;lblHD.ForeColor=Color.FromArgb(0,0,255);
			checkGC.Checked=false;lblGC.ForeColor=Color.FromArgb(0,0,255);
			checkNN.Checked=false;lblGC.ForeColor=Color.FromArgb(0,0,255);
			checkCS.Checked=false;lblCS.ForeColor=Color.FromArgb(0,0,255);
			checkSK.Checked=false;lblSK.ForeColor=Color.FromArgb(0,0,255);
			checkDThe.Checked=false;lblDThe.ForeColor=Color.FromArgb(0,0,255);
		}

		private void print_t(bool prn)
		{			
			dsxml.ReadXml("..\\xml\\h_BaoCaosyll.xml");
			dsxml.Clear();
			int pos;string ma;
			string sql="SELECT l.manv,l.ho+' '+l.ten as hoten,l.bidanh as tengoikhac,";
			sql+=" m.diengiai as chucvuhientai,iif(to_char(l.ngaysinh,'dd/mm/yyyy')<>'',day(l.ngaysinh),0) as ngays ,iif(to_char(l.ngaysinh,'dd/mm/yyyy')<>'',month(l.ngaysinh),0) as thangs,";
			sql+=" iif(to_char(l.ngaysinh,'dd/mm/yyyy')<>'',year(l.ngaysinh),namsinh) as nams,dt.tendt as dtoc,tg.tentg as tong,l.noisinh as nois,l.quequan as Queq,";
			sql+=" l.diachi as noiohnay,l.tp_x_than as tpgdXuatThan,l.tp_b_than as nnbttkdTuyenDung,l.msthue,";
			sql+=" to_char(l.ngay_t_gia,'dd/mm/yyyy') as ntgCM,";
			sql+=" to_char(hd.ngaydenct,'dd/mm/yyyy') as ndTuyendung,";	
			sql+=" to_char(l.dubi_dang,'dd/mm/yyyy') as nvDang,";
			sql+=" to_char(l.cthuc_dang,'dd/mm/yyyy') as ncthuc,";						
			sql+=" IIf(l.chinhtri='SC','Sơ Cấp',IIf(l.chinhtri='CC','Cao Cấp',";
			sql+=" IIf(l.chinhtri='CN','Cử Nhân',IIf(l.chinhtri='TC','Trung Cấp','')))) AS LLctri,";
			sql+=" iif(l.mann<>'',nn.tennn,'') as nngu,m.diengiai as ctacCtridptrach,";
			sql+=" iif(hd.mangach='','',mngach.diengiai) as nccVienchuc,hd.mangach as mas,";			
			sql+=" hd.mangach as mangach,hd.hs_lc,00 as b,";
			sql+=" day(date()) as ngayht,";
			sql+=" month(date()) as thanght,year(date()) as namht,";			
			sql+=" to_char(hd.ngayhd,'dd/mm/yyyy') as tthang,l.hinhanh,l.kynang as stctac";
			sql+=" From (((((llnv l inner join hopdong hd on hd.manv=l.manv)";
			sql+=" inner join dantoc dt on dt.madt=l.madt)";
			sql+=" inner join tongiao tg on tg.matgiao=l.matgiao)";
			sql+=" inner join mangach mngach on mngach.ma=hd.mangach)";
			sql+=" left join macv m on m.macv=hd.macv) left join ngoaingu nn on nn.mann=l.mann";
			sql+=" where l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
		
			ds=mDB.get_data(sql);
			DataRow r1;
			DataRow [] dr;
			foreach(DataRow r  in ds.Tables[0].Rows)
			{
				pos=Convert.ToInt16(mDB.next_bacluong(r["mangach"].ToString(),decimal.Parse(r["hs_lc"].ToString())));
				if (pos>0 && pos<16)
				{
					ma=pos.ToString().Trim();	
					dr=dsxml.Tables[0].Select("hoten='"+r["hoten"].ToString()+"'");										
					r1=dsxml.Tables[0].NewRow();
					r1["manv"]=r["manv"].ToString();
					r1["hoten"]=r["hoten"].ToString();	
					r1["tengoikhac"]=r["tengoikhac"].ToString();
					r1["chucvuhientai"]=r["chucvuhientai"].ToString();
					r1["ngays"]=r["ngays"].ToString();
					r1["thangs"]=r["thangs"].ToString();
					r1["nams"]=r["nams"].ToString();
					r1["dtoc"]=r["dtoc"].ToString();
					r1["tong"]=r["tong"].ToString();
					r1["nois"]=r["nois"].ToString();
					r1["Queq"]=r["Queq"].ToString();
					r1["noiohnay"]=r["noiohnay"].ToString();
					r1["tpgdXuatThan"]=r["tpgdXuatThan"].ToString();
					r1["nnbttkdTuyenDung"]=r["nnbttkdTuyenDung"].ToString();
					r1["ntgCM"]=r["ntgCM"].ToString();
					r1["ndTuyendung"]=r["ndTuyendung"].ToString();
					r1["nvDang"]=r["nvDang"].ToString();
					r1["ncthuc"]=r["ncthuc"].ToString();					
					r1["LLctri"]=r["LLctri"].ToString();
					r1["nngu"]=r["nngu"].ToString();
					r1["ctacCtridptrach"]=r["ctacCtridptrach"].ToString();
					r1["nccVienchuc"]=r["nccVienchuc"].ToString();
					r1["mas"]=r["mas"].ToString();
					r1["mangach"]=r["mangach"].ToString();
					r1["hs_lc"]=decimal.Parse(r["hs_lc"].ToString());
					r1["ngayht"]=r["ngayht"].ToString();
					r1["thanght"]=r["thanght"].ToString();
					r1["namht"]=r["namht"].ToString();
					r1["tthang"]=r["tthang"].ToString();
					r1["stctac"]=r["stctac"].ToString();					
					r1["hinhanh"]=r["hinhanh"].ToString();
					r1["b"]=ma;
                    r1["msthue"] = r["msthue"].ToString();
					dsxml.Tables[0].Rows.Add(r1);	
				}
			}

			DataSet ds1=new DataSet();
			string sql1=" SELECT l.mahocham,hm.tenhocham";
			sql1+=" FROM llnv l left join hocham hm on l.mahocham=hh.mahocham";
			sql1+=" WHERE l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds1=mDB.get_data(sql1);

			foreach(DataRow r  in ds1.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].Rows[0];				
				r1["mahocham"]=(r["mahocham"].ToString()!="")?(r["mahocham"].ToString()):"";
				r1["tenhocham"]=(r["tenhocham"].ToString()!="")?(r["tenhocham"].ToString()):"";				
			}

			DataSet ds11=new DataSet();
			string sql11=" SELECT hv.tenhv";
			sql11+=" FROM llnv l left join hocvan hv on hv.mahv=l.mahv";
			sql11+=" WHERE l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds11=mDB.get_data(sql11);

			foreach(DataRow r  in ds11.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].Rows[0];				
				r1["tenhv"]=r["tenhv"].ToString();				
			}

			DataSet ds2=new DataSet();
			string sql2=" SELECT sk.benhly";
			sql2+=" FROM llnv l left join suckhoe sk on sk.manv=l.manv";
			sql2+=" WHERE l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds2=mDB.get_data(sql2);

			foreach(DataRow r  in ds2.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].Rows[0];				
				r1["benhly"]=r["benhly"].ToString();							
			}

			DataSet ds22=new DataSet();
			string sql22=" SELECT kt.noidung as Khen";
			sql22+=" FROM llnv l ,ktkl as kt";
			sql22+=" WHERE l.manv=kt.manv and kt.ktkl=(-1) and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds22=mDB.get_data(sql22);

			foreach(DataRow r  in ds22.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].NewRow();
				r1["Khen"]=r["Khen"].ToString();
				dsxml.Tables[0].Rows.Add(r1);
			}
			
			DataSet ds222=new DataSet();
			string sql222=" SELECT kt.noidung as Ky";
			sql222+=" FROM llnv l,ktkl as kt";
			sql222+=" WHERE l.manv=kt.manv and kt.ktkl=0 and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds222=mDB.get_data(sql222);

			foreach(DataRow r  in ds222.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].NewRow();
				r1["Ky"]=r["Ky"].ToString();
				dsxml.Tables[0].Rows.Add(r1);
			}

			DataSet ds3=new DataSet();
			string sql3=" SELECT a.ghichu,b.tenctdt,to_char(a.tungay,'dd/mm/yyyy') +'  -  '+  to_char(a.denngay,'dd/mm/yyyy') as tungay,";
			sql3+=" to_char(a.denngay,'dd/mm/yyyy') as denngay,c.tenhe,d.tenbang";
			sql3+=" FROM llnv l,qtdaotao a,ctdaotao b,hedaotao c,bangcap d";
			sql3+=" WHERE l.manv=a.manv and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"' and ";
			sql3+=" a.mahv=b.mactdt and a.hehocvan=c.mahe and a.mabangcap=d.mabangcap";
			ds3=mDB.get_data(sql3);

			foreach(DataRow r  in ds3.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].NewRow();												
				r1["ghichu"]=r["ghichu"].ToString();				
				r1["tenctdt"]=r["tenctdt"].ToString();				
				r1["tungay"]=r["tungay"].ToString();				
				r1["denngay"]=r["denngay"].ToString();				
				r1["tenhe"]=r["tenhe"].ToString();				
				r1["tenbang"]=r["tenbang"].ToString();	
				dsxml.Tables[0].Rows.Add(r1);	
			}

			DataSet ds44=new DataSet();
			string sql44=" SELECT to_char(c.ngayhl,'dd/mm/yyyy') +'  -  '+ to_char(c.denngay,'dd/mm/yyyy') as c25a,";
			sql44+=" (c.nghenghiep) as c25b,c.ndcv as c25c,c.donvi as c25d";
			sql44+=" FROM llnv l,congviec c";
			sql44+=" WHERE l.manv=c.manv and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds44=mDB.get_data(sql44);

			foreach(DataRow r  in ds44.Tables[0].Rows)
			{
				r1=dsxml.Tables[0].NewRow();												
				r1["c25a"]=r["c25a"].ToString();				
				r1["c25b"]=r["c25b"].ToString();								
				r1["c25c"]=r["c25c"].ToString();				
				r1["c25d"]=r["c25d"].ToString();				
				dsxml.Tables[0].Rows.Add(r1);	
			}
			//	dsxml.WriteXml("d:\\BaoCaosyll.xml",XmlWriteMode.WriteSchema);
            //if (dsxml.Tables[0].Rows.Count>0)
            //{
            //    if (prn) rpt.Printer(dsxml,"BaoCaosyll.rpt","SƠ YẾU LÝ LỊCH",1);
            //    else
            //    {		
            //        frmReport f=new frmReport(dsxml,"SƠ YẾU LÝ LỊCH","BaoCaosyll.rpt",3,true);
            //        f.ShowDialog(this);
            //    }
            //}
            //else
            //    MessageBox.Show("Chưa có đầy đủ thông tin","Thông Báo");
		}

		private void  print(bool prn)
		{			
           dsxml.ReadXml("..\\xml\\h_BaoCaosyll.xml");
           dsxml.Clear();
			//int pos;string ma;
			string sql="SELECT l.manv,trim(l.ho)||' '||trim(l.ten) as hoten,l.bidanh as tengoikhac,";
			sql+=" m.diengiai as chucvuhientai,";
            sql += " NULLIF(to_char(l.ngaysinh,'dd'),'') as ngays ,NULLIF(to_char(l.ngaysinh,'mm'),'') as thangs,";
            sql += " l.namsinh as nams,l.phai,dt.tendt as dtoc,tg.tentg as tong,l.noisinh as nois,l.quequan as Queq,";
			sql+=" l.diachi as noiohnay,l.tp_x_than as tpgdXuatThan,l.tp_b_than as nnbttkdTuyenDung,l.msthue as msthue,";
			sql+=" to_char(l.ngay_t_gia,'dd/mm/yyyy') as ntgCM,";
			sql+=" to_char(hd.ngaydenct,'dd/mm/yyyy') as ndTuyendung,";	
			sql+=" to_char(l.dubi_dang,'dd/mm/yyyy') as nvDang,";
			sql+=" to_char(l.cthuc_dang,'dd/mm/yyyy') as ncthuc,";
            sql += " case when l.chinhtri='SC' then 'Sơ Cấp' when l.chinhtri='CC' then 'Cao Cấp' ";
            sql+=" when l.chinhtri='CN' then 'Cử Nhân' when l.chinhtri='TC' then 'Trung Cấp' else '' end AS LLctri, ";
            sql += " case when hd.tdqlnn='02' then 'Sơ Cấp' when hd.tdqlnn='03' then 'Trung Cấp' ";
            sql += " when hd.tdqlnn='04' then 'Cao cấp' else '' end AS qlnn ";

            sql += " ,case when l.mann <> '' then trim(nn1.tennn)||'_'||trim(tn1.ten)  else '' end as ngoaingu";
            sql += " ,case when l.mann1 <> '' then trim(nn2.tennn)||'_'||trim(tn2.ten) else '' end as ngoaingu1";
            sql += " ,case when l.mann2 <> '' then trim(nn3.tennn)||'_'||trim(tn3.ten)  else '' end as ngoaingu2";
            sql += " ,case when l.mann3 <> '' then trim(nn4.tennn)||'_'||trim(tn4.ten) else '' end as ngoaingu3";

            sql+=" ,m.diengiai as ctacCtridptrach,";//case when l.mann<>'' then nn.tennn else '' end as nngu
            sql +=" case when hd.mangach='' then '' else mngach.diengiai end  as nccVienchuc,hd.mangach as mas,";			
			sql+=" hd.mangach as mangach,hd.hs_lc,hd.bac as b,";
			sql+=" to_char(now(),'dd') as ngayht,";
            sql += " to_char(now(),'mm') as thanght,to_char(now(),'yyyy') as namht,";			
			sql+=" to_char(hd.ngayhd,'dd/mm/yyyy') as tthang,l.hinhanh,l.kynang as stctac,l.mahocham,hm.tenhocham,";
			sql+=" hv.tenhv as hocvan ,sk.benhly,";
            sql += " th.ten as vitinh";
            sql += " From " + m_user + ".llnv l inner join " + m_user + ".hopdong hd on hd.manv=l.manv ";
            sql += " inner join " + m_user + ".dantoc dt on dt.madt=l.madt";
            sql += " inner join " + m_user + ".tongiao tg on tg.matgiao=l.matgiao inner join " + m_user + ".mangach mngach on mngach.ma=hd.mangach ";
            sql += " left join " + m_user + ".ngoaingu nn on nn.mann=l.mann left join " + m_user + ".dmcv m on hd.macv=m.macv left join " + m_user + ".hocham hm on hm.mahocham=l.mahocham";
            sql += " left join " + m_user + ".hocvan hv on hv.mahv=l.mahv left join " + m_user + ".suckhoe sk on sk.manv=l.manv";
            
            sql += " left join " + m_user + ".tdnnth th on l.tdth=th.ma";
           
            sql += " left join " + m_user + ".ngoaingu_1 nn1 on l.mann=nn1.mann";
            sql += " left join " + m_user + ".tdnn1 tn1 on l.tdnn=tn1.ma";
            sql += " left join " + m_user + ".ngoaingu_2 nn2 on l.mann1=nn2.mann";
            sql += " left join " + m_user + ".tdnn2 tn2 on l.tdnn1=tn2.ma";
            sql += " left join " + m_user + ".ngoaingu_3 nn3 on l.mann2=nn3.mann";
            sql += " left join " + m_user + ".tdnn3 tn3 on l.tdnn2=tn3.ma";
            sql += " left join " + m_user + ".ngoaingu_4 nn4 on l.mann3=nn4.mann";
            sql += " left join " + m_user + ".tdnn4 tn4 on l.tdnn3=tn4.ma";

            sql += " inner join "+m_user+".max_lan ml on hd.manv=ml.manv";
			sql += " WHERE hd.lan=ml.lan and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
            sql += " and sk.id = (select max(id) from "+m_user+".suckhoe where manv='"+txtMaSoNV.Text.Trim()+"')";
			ds=mDB.get_data(sql);
            //ds.WriteXml("..\\xml\\h_BaoCaosyll.xml", XmlWriteMode.WriteSchema);
			DataRow r1,r0;
			DataRow [] dr,dr1;
			foreach(DataRow r  in ds.Tables[0].Rows)
			{
				//pos=Convert.ToInt16(mDB.next_bacluong(r["mangach"].ToString(),decimal.Parse(r["hs_lc"].ToString())));
                //if (pos>0 && pos<16)
                //{
					//ma=pos.ToString().Trim();
                    r0=mDB.getrowbyid(dsxml.Tables[0], "manv='" + r["manv"].ToString() + "'");
                    if (r0 == null)
                    {
                        r1 = dsxml.Tables[0].NewRow();
                        dr = dsxml.Tables[0].Select("manv='" + r["manv"].ToString() + "'");
                        r1["manv"] = r["manv"].ToString();
                        r1["hoten"] = r["hoten"].ToString();
                        r1["tengoikhac"] = r["tengoikhac"].ToString();
                        r1["chucvuhientai"] = r["chucvuhientai"].ToString();
                        r1["ngays"] = r["ngays"].ToString() ;//!= "") ? (int.Parse(r["ngays"].ToString())) : 0;
                        r1["thangs"] = r["thangs"].ToString() ;//!= "") ? (int.Parse(r["thangs"].ToString())) : 0;//xem
                        r1["nams"] = r["nams"].ToString();
                        r1["phai"] = r["phai"].ToString();
                        r1["dtoc"] = r["dtoc"].ToString();
                        r1["tong"] = r["tong"].ToString();
                        r1["nois"] = r["nois"].ToString();
                        r1["Queq"] = r["Queq"].ToString();
                        r1["noiohnay"] = r["noiohnay"].ToString();
                        r1["tpgdXuatThan"] = r["tpgdXuatThan"].ToString();
                        r1["nnbttkdTuyenDung"] = r["nnbttkdTuyenDung"].ToString();
                        r1["ntgCM"] = r["ntgCM"].ToString();
                        r1["ndTuyendung"] = r["ndTuyendung"].ToString();

                        r1["msthue"] = r["msthue"].ToString();

                        r1["nvDang"] = r["nvDang"].ToString();
                        r1["ncthuc"] = r["ncthuc"].ToString();
                        r1["LLctri"] = r["LLctri"].ToString();
                        r1["QLNN"] = r["qlnn"].ToString();

                        r1["ngoaingu"] = r["ngoaingu"].ToString();
                        r1["ngoaingu1"] = r["ngoaingu1"].ToString();
                        r1["ngoaingu2"] = r["ngoaingu2"].ToString();
                        r1["ngoaingu3"] = r["ngoaingu3"].ToString();
                        r1["vitinh"] = r["vitinh"].ToString();
                        r1["ctacCtridptrach"] = r["ctacCtridptrach"].ToString();
                        r1["nccVienchuc"] = r["nccVienchuc"].ToString();
                        r1["mas"] = r["mas"].ToString();
                        r1["mangach"] = r["mangach"].ToString();
                        r1["hs_lc"] = decimal.Parse(r["hs_lc"].ToString());
                        r1["ngayht"] = r["ngayht"].ToString();
                        r1["thanght"] = r["thanght"].ToString();
                        r1["namht"] = r["namht"].ToString();
                        r1["tthang"] = r["tthang"].ToString();
                        r1["stctac"] = r["stctac"].ToString();
                        r1["hinhanh"] = r["hinhanh"];
                        r1["b"] = r["b"].ToString();
                        r1["mahocham"] = (r["mahocham"].ToString() != "") ? r["mahocham"].ToString() : "";
                        r1["tenhocham"] = (r["tenhocham"].ToString() != "") ? r["tenhocham"].ToString() : "";
                        r1["hocvan"] = (r["hocvan"].ToString() != "") ? (r["hocvan"].ToString()) : "";
                        r1["benhly"] = (r["benhly"].ToString() != "") ? (r["benhly"].ToString()) : "";
                        dsxml.Tables[0].Rows.Add(r1);
                    }
				//}
			}

			DataSet ds22=new DataSet();
			string sql22=" SELECT kt.manv,kt.noidung as Khen";
            sql22 += " FROM " + m_user + ".llnv l left join " + m_user + ".ktkl kt on kt.manv=l.manv";
			sql22+=" WHERE kt.ktkl=false and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
            sql22 += " and kt.ngay=(select max(ngay) from " + m_user + ".ktkl where manv='"+txtMaSoNV.Text.Trim() +"')";
			ds22=mDB.get_data(sql22);

			foreach(DataRow r  in ds22.Tables[0].Rows)
			{
                r0 = mDB.getrowbyid(dsxml.Tables[0], "manv='" + r["manv"].ToString() + "'");
                if (r0 != null)
                {
                    //r0["Khen"] = r["Khen"].ToString();
                    dr1 = dsxml.Tables[0].Select("manv='" + r["manv"].ToString() + "'");
                    dr1[0]["khen"] = r["Khen"].ToString();
                }
				
			}
			
			DataSet ds222=new DataSet();
			string sql222=" SELECT kt.manv, kt.noidung as Ky";
            sql222 += " FROM " + m_user + ".llnv l left join " + m_user + ".ktkl kt on kt.manv=l.manv";
			sql222+=" WHERE kt.ktkl=true and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
            sql222 += " and kt.ngay=(select max(ngay) from "+m_user +".ktkl where manv='"+txtMaSoNV.Text.Trim()+"')";
           
			ds222=mDB.get_data(sql222);

			foreach(DataRow r  in ds222.Tables[0].Rows)
			{
                r1 = mDB.getrowbyid(dsxml.Tables[0], "manv='" + r["manv"].ToString() + "'");
                if (r1 != null)
                {
                    dr1 = dsxml.Tables[0].Select("manv='" + r["manv"].ToString() + "'");
                    dr1[0]["Ky"] = r["Ky"].ToString();
                }
			}

			DataSet ds3=new DataSet();
			string sql3=" SELECT l.manv,a.ghichu,b.tenctdt,";
            sql3 += " to_char(a.tungay,'dd/mm/yyyy') ||'  -  '|| to_char(a.denngay,'dd/mm/yyyy') as tungay,";
			sql3+=" to_char(a.denngay,'dd/mm/yyyy') as denngay,c.tenhe,d.tenbang";
            sql3 += " FROM (((" + m_user + ".llnv l left join " + m_user + ".qtdaotao a on a.manv=l.manv) left join " + m_user + ".ctdaotao b on b.mactdt=l.nnghiep) ";
            sql3 += " left join " + m_user + ".hedaotao c on c.mahe=a.hehocvan)";
            sql3 += " left join " + m_user + ".bangcap d on l.td_nnghiep=d.mabangcap";
            sql3 += " where l.manv='" + txtMaSoNV.Text.ToString().Trim() + "'";
			ds3=mDB.get_data(sql3);
            try
            {
                foreach (DataRow r in ds3.Tables[0].Rows)
                {
                    r1 = mDB.getrowbyid(dsxml.Tables[0], "manv='" + r["manv"].ToString() + "'");
                    if (r1 != null)
                    {
                        dr1 = dsxml.Tables[0].Select("manv='" + r["manv"].ToString() + "'");
                        dr1[0]["ghichu"] = r["ghichu"].ToString();
                        dr1[0]["tenctdt"] = r["tenctdt"].ToString();
                        dr1[0]["tungay"] = r["tungay"].ToString();
                        dr1[0]["denngay"] = r["denngay"].ToString();
                        dr1[0]["tenhe"] = r["tenhe"].ToString();
                       // MessageBox.Show(r["tenbang"].ToString());
                        dr1[0]["tenbang"] = r["tenbang"].ToString();
                        //dsxml.Tables[0].Rows.Add(r1);
                    }
                }
            }
            catch(Exception ex) 
            {
                MessageBox.Show(ex.ToString());
            }

			DataSet ds44=new DataSet();
			string sql44=" SELECT l.manv,to_char(c.ngayhl,'dd/mm/yyyy') ||'  -  '|| to_char(c.denngay,'dd/mm/yyyy') as c25a,";
			sql44+=" (c.nghenghiep) as c25b,c.ndcv as c25c,c.donvi as c25d";
            sql44 += " FROM " + m_user + ".llnv l," + m_user + ".congviec c";
			sql44+=" WHERE l.manv=c.manv and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds44=mDB.get_data(sql44);

			foreach(DataRow r  in ds44.Tables[0].Rows)
			{
				r1 = mDB.getrowbyid(dsxml.Tables[0], "manv='" + r["manv"].ToString() + "'");
                if (r1 != null)
                {
                    dr1 = dsxml.Tables[0].Select("manv='" + r["manv"].ToString() + "'");
                    dr1[0]["c25a"] = r["c25a"].ToString();
                    dr1[0]["c25b"] = r["c25b"].ToString();
                    dr1[0]["c25c"] = r["c25c"].ToString();
                    dr1[0]["c25d"] = r["c25d"].ToString();
                }
			}
			dsxml.WriteXml("..\\xml\\h_BaoCaosyll.xml",XmlWriteMode.WriteSchema);
            if (dsxml.Tables[0].Rows.Count > 0)
            {

                frmReport f = new frmReport(mDB, dsxml, lan.Change_language_MessageText("TIỂU SỬ TÓM TẮT"), "h_BaoCaosyll.rpt", false,ten_nd);
                    f.ShowDialog(this);
                
            }
            else
                MessageBox.Show(lan.Change_language_MessageText("Chưa có đầy đủ thông tin"),lan.Change_language_MessageText("Thông Báo"));
		}
		private void print1(bool prn)
		{	
			try
			{
                dsxml.ReadXml("..\\xml\\h_BaoCaosyll1.xml");
				dsxml.Clear();
			
				DataRow r1;					
			
				DataSet ds22=new DataSet();
				string sql22=" SELECT kt.noidung as Khen";
				sql22+=" FROM llnv l,ktkl as kt";
				sql22+=" WHERE l.manv=kt.manv and kt.ktkl=(-1) and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
				ds22=mDB.get_data(sql22);

				foreach(DataRow r  in ds22.Tables[0].Rows)
				{
					r1=dsxml.Tables[0].NewRow();
					r1["Khen"]=r["Khen"].ToString();
					dsxml.Tables[0].Rows.Add(r1);
				}
			
				DataSet ds222=new DataSet();
				string sql222=" SELECT kt.noidung as Ky";
				sql222+=" FROM llnv l,ktkl as kt";
				sql222+=" WHERE l.manv=kt.manv and kt.ktkl=0 and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
				ds222=mDB.get_data(sql222);

				foreach(DataRow r  in ds222.Tables[0].Rows)
				{
					r1=dsxml.Tables[0].Rows[0];
					r1["Ky"]=r["Ky"].ToString();				
				}

			
				//dsxml.WriteXml("d:\\BaoCaosyll1.xml",XmlWriteMode.WriteSchema);
				//			if (dsxml.Tables[0].Rows.Count>0)
            //{
            //    if (prn) rpt.Printer(dsxml,"BaoCaosyll1.rpt","",1);
            //    else
            //    {		
            //        frmReport f=new frmReport(dsxml,"","BaoCaosyll1.rpt",3,true);
            //        f.ShowDialog(this);
            //    }
            //}
				//			else
				//				MessageBox.Show("Nhân viên này chưa được khen thưởng , kỷ luật","Thông Báo");
			}
			catch{}
		}

		private void print2(bool prn)
		{			
			DataSet ds3=new DataSet();
			string sql3=" SELECT a.ghichu,b.tenctdt,to_char(a.tungay,'dd/mm/yyyy') +'  -  '+  to_char(a.denngay,'dd/mm/yyyy') as tungay,";
			sql3+=" to_char(a.denngay,'dd/mm/yyyy') as denngay,c.tenhe,d.tenbang";
			sql3+=" FROM llnv l,qtdaotao a,ctdaotao b,hedaotao c,bangcap d";
			sql3+=" WHERE l.manv=a.manv and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"' and ";
			sql3+=" a.mahv=b.mactdt and a.hehocvan=c.mahe and a.mabangcap=d.mabangcap";
			ds3=mDB.get_data(sql3);

			//ds3.WriteXml("d:\\BaoCaosyll2.xml",XmlWriteMode.WriteSchema);
            //if (ds3.Tables[0].Rows.Count>0)
            //{
            //    if (prn) rpt.Printer(ds3,"BaoCaosyll2.rpt","",1);
            //    else
            //    {		
            //        frmReport f=new frmReport(ds3,"","BaoCaosyll2.rpt",3,true);
            //        f.ShowDialog(this);
            //    }
            //}
            //else
            //    MessageBox.Show("Chưa có đầy đủ thông tin về quá trình đào tạo của nhân viên này","Thông Báo");
		}

		private void print3(bool prn)
		{									
			DataSet ds44=new DataSet();
			string sql44=" SELECT to_char(c.ngayhl,'dd/mm/yyyy') +'  -  '+ to_char(c.denngay,'dd/mm/yyyy') as c25a,";
			sql44+=" trim(c.nghenghiep) +' - '+ trim(c.ndcv) +' - '+ trim(c.donvi) as c25d";
			sql44+=" FROM llnv l,congviec c";
			sql44+=" WHERE l.manv=c.manv and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
			ds44=mDB.get_data(sql44);

			//ds44.WriteXml("d:\\BaoCaosyll3.xml",XmlWriteMode.WriteSchema);
            //if (ds44.Tables[0].Rows.Count>0)
            //{
            //    if (prn) rpt.Printer(ds44,"BaoCaosyll3.rpt","",1);
            //    else
            //    {		
            //        frmReport f=new frmReport(ds44,"","BaoCaosyll3.rpt",3,true);
            //        f.ShowDialog(this);
            //    }
            //}
            //else
            //    MessageBox.Show("Chưa có đầy đủ thông tin về quá trình công tác của nhân viên này","Thông Báo");
		}

		private void print4(bool prn)
		{	
			try
			{					
				DataSet ds44=new DataSet();
				string sql44=" SELECT dt.tendt as c1,gc.htendtg as c2, gc.namsinh as c3,gc.quequan as c4";
				sql44+=" FROM giacanh gc,doituong dt,llnv l";
				sql44+=" WHERE l.manv=gc.manv and gc.madt=dt.madt and l.manv='"+txtMaSoNV.Text.ToString().Trim()+"'";
				sql44+=" order by dt.madt";
				ds44=mDB.get_data(sql44);

				//ds44.WriteXml("d:\\BaoCaosyll4.xml",XmlWriteMode.WriteSchema);
							
                //if (prn) rpt.Printer(ds44,"BaoCaosyll4.rpt","",1);
                //else
                //{		
                //    frmReport f=new frmReport(ds44,"","BaoCaosyll4.rpt",3,true);
                //    f.ShowDialog(this);
                //}
			}
			catch{}
		}

		private void butThem_Click(object sender, System.EventArgs e)
		{
			try
			{
				if(!kiemtra()) return;
                if (!capnhatttnhanvien())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không cập nhật được lý lịch nhân viên!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                if (fag == 1 && !thaydoi_madv())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Thông báo"),lan.Change_language_MessageText("Không cập nhật được mã đơn vị"),MessageBoxButtons.OK,MessageBoxIcon.Warning);
                    return;
                }
                if (fag == 1 && !thaydoi_macv())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Thông báo"), lan.Change_language_MessageText("Không cập nhật được mã chức vụ"), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                enable_but(true);
                butEdit.Enabled = admin;
                butHuy.Enabled = admin;
                enable_ctl(false);
                if (bVantay && ma_vantay=="")
                    luu_vantay();
				txtMaSoNV.Focus();
				tongso();	
				butTiep.Focus();
				load_dgrid("");
                load_LLNV();
			}	
			catch{}
							
		}
        private void luu_vantay()
        {
            try
            {
                string ma = txtMaSoNV.Text.Trim();
                fnhandang.save_orac(ma);
            }
            catch { }
        }
		private void SaveImage()
		{
			if (bBarcode)
			{
				if (!System.IO.Directory.Exists("..\\barcode")) System.IO.Directory.CreateDirectory("..\\barcode");
				barcode.Picture.Save("..\\barcode\\barcode.bmp");
				pBarcode.Tag = "..\\barcode\\barcode.bmp";
				fstr = new System.IO.FileStream(pBarcode.Tag.ToString(), System.IO.FileMode.Open, System.IO.FileAccess.Read);
				image = new byte[fstr.Length];
				fstr.Read(image, 0, System.Convert.ToInt32(fstr.Length));
				map = new Bitmap(Image.FromStream(fstr));
				pBarcode.Tag = image;
				pBarcode.Image = (Bitmap)map;
				fstr.Close();
				mDB.upd_barcode(txtMaSoNV.Text, (byte[])(image));
			}
			mDB.upd_image_nv(txtMaSoNV.Text,(byte[]) picNhanVien.Tag);
		}
		private bool capnhatttnhanvien()
		{			
			string  ma_nv,manv1,ho_nv,ten_nv,bo_phan,ten_bp,chucvu,ten_cv,bi_danh,sott,phai_,dan_toc,ton_giao,
				ngay_sinh,nguyen_quan,quoc_tich,thuong_tru,noi_ohiennay,noi_sinh,dien_thoai,tinh_thuongtru,
				huyen_thuongtru,tinh_ohiennay,ma_quocgia,huyen_ohiennay,so_cmnd,noi_capcmnd,ngay_capcmnd,
				s_mavt,s_macd,s_dtdd,s_ngay_bn,cthich_cv,msthue,ip,macc;
            decimal hs_cv = 0;
			int nam_sinh=0,tg_bn;
            bool gttv = false;
			try
			{
				ma_nv=txtMaSoNV.Text;
				manv1=txtMaSoNV.Text;
				ho_nv=txtHoNV.Text;
				ten_nv=txtTenNV.Text;
				bo_phan=cboBoPhan.SelectedValue.ToString();				
				ten_bp=cboBoPhan.Text;
				chucvu=cboChucVu.SelectedValue.ToString();				
				ten_cv=cboChucVu.Text;
				bi_danh=txtBiDanh.Text;		
				sott=(txtThuTu.Text.ToString());
				phai_=cboPhai.Text.ToString();
				dan_toc=cboDanToc.SelectedValue.ToString();
				ton_giao=cboTonGiao.SelectedValue.ToString();
                ip = txtipmay.Text;
                if (txt_macc.Visible == true)
                {
                    macc = txt_macc.Text.Trim();
                }
                else
                {
                    macc = "0";
                }
                // "  /  /"
                dtpNgaySinh.Text = dtpNgaySinh.Text.Trim();
                if (dtpNgaySinh.Text.Trim() == "/  /")
                    ngay_sinh = "";
                else
				    ngay_sinh=dtpNgaySinh.Text.ToString();
				nguyen_quan=txtNguyenQuan.Text.ToString();
				ma_quocgia=cboNguyenQuan.SelectedValue.ToString();
				quoc_tich=cboNguyenQuan.SelectedValue.ToString();
				thuong_tru=txtThuongTru.Text.ToString();
				noi_ohiennay=txtNoiOHN.Text.ToString();
				noi_sinh=txtNoiSinh.Text.ToString();
				dien_thoai=txtDienThoai.Text.ToString();
				tinh_thuongtru=cboTinhThuongTru.SelectedValue.ToString();
				huyen_thuongtru=cboQuanThuongTru.SelectedValue.ToString();
				tinh_ohiennay=cboTinhOHN.SelectedValue.ToString();
				huyen_ohiennay=cboQuanOHN.SelectedValue.ToString();
				so_cmnd=txtSoCMND.Text;
				noi_capcmnd=txtNoiCapCMND.Text;
                //
                dtpNgayCapCMND.Text=dtpNgayCapCMND.Text.Trim();
                if (dtpNgayCapCMND.Text.Trim() == "/  /")
                    ngay_capcmnd = "";
                else
				    ngay_capcmnd=dtpNgayCapCMND.Text;				
				s_mavt=txtMVTat.Text;
				s_macd=cboChucdanh.SelectedValue.ToString();
				s_dtdd=txtCellphone.Text.Trim();
					
				try
				{
					if(txtnamsinh.Text.Trim() !="")
						nam_sinh=int.Parse(txtnamsinh.Text.Trim());
					else
						if(ngay_sinh.Trim()!="")
						nam_sinh =int.Parse(ngay_sinh.Substring(6,4).ToString());
				}
				catch{}
                txtNgayBN.Text = txtNgayBN.Text.Trim();
                if (txtNgayBN.Text.Trim() == "/  /")
                    s_ngay_bn = "";
                else
				    s_ngay_bn=txtNgayBN.Text; //bổ nhiệm

				tg_bn=(txtTGBN.Text.Trim()=="")?0:int.Parse(txtTGBN.Text);
				cthich_cv=cboChucVu.Text;
                // thang
                string m_nganhang = "0";
                if (txtNganhang.SelectedIndex != -1)
                {
                    m_nganhang = txtNganhang.SelectedValue.ToString();
                }
                // them cot maso thue
                msthue=txt_masothue.Text.Trim();
                try
                {
                    gttv=mDB.Insert_lylichnv(ma_nv, manv1, bo_phan, sott, ho_nv,
                        ten_nv, bi_danh, ngay_sinh, phai_, noi_sinh, nguyen_quan,
                        thuong_tru, tinh_thuongtru, huyen_thuongtru,
                        noi_ohiennay, tinh_ohiennay, huyen_ohiennay, dien_thoai,
                        so_cmnd, ngay_capcmnd, noi_capcmnd, dan_toc,
                        ton_giao, quoc_tich, s_mavt, int.Parse(nam_sinh.ToString()),
                        s_dtdd, s_macd,txtSotk.Text,m_nganhang,msthue,ten_nd,macc,ngayht);
                    mDB.Execute_data("update nhansu.llnv set ip='" + ip + "' where manv='" + ma_nv + "'");
                }
                catch (Exception e)
                {
                    return false;
                }

                if (picNhanVien.Tag.ToString() != "")
                {
                    SaveImage(); 
                }

				try
				{
                    hs_cv = get_hscv(chucvu.Trim());
					gttv= mDB.Insert_hopdongLylich(ma_nv,bo_phan,manv1,sott,chucvu,cthich_cv,s_ngay_bn,tg_bn,hs_cv);
				}
				catch(Exception ex)
                {
                    return false;
                }			
			}
			catch
            {
                return false;
            }
            return gttv;
		}
        private decimal get_hscv(string macv)
        {
            DataSet dscv = new DataSet();
            dscv = mDB.get_data(" select hscv from " + mDB.user + ".dmcv where macv='" + macv + "'");
            decimal hscv = decimal.Parse(dscv.Tables[0].Rows[0][0].ToString());
            return hscv;
        }
		 void tongso()
		{
			try
			{
                ds=mDB.f_countNV();
                TSo=ds.Tables[0].Rows[0][0].ToString();
				txtTSo.Text="";
				txtTSo.Text=TSo;
			}
			catch{}
		}
		private bool kiemtra()
		{
			if(cboBoPhan.SelectedIndex==-1 || txtMaBP.Text=="")
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập mã bộ phận"),lan.Change_language_MessageText("Thông báo"));
				txtMaBP.Focus();
				return false;
			}

			if(txtMaSoNV.Text==""||txtMaSoNV.Text=="00000")
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập mã nhân viên"),lan.Change_language_MessageText("Thông báo"));
				txtMaSoNV.Focus();
				return false;
			}
			if(cboChucVu.SelectedIndex==-1 || txtChucVu.Text=="" || txtChucVu.Text=="000")
			{
				MessageBox.Show(lan.Change_language_MessageText("Nhập mã chức vụ"),lan.Change_language_MessageText("Thông báo"));
				txtChucVu.Focus();
				return false;
			}
			if(txtHoNV.Text=="" )
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập họ nhân viên"),lan.Change_language_MessageText("Thông báo"));
				txtHoNV.Focus();
				return false;
			}
			if(txtTenNV.Text=="")
			{
				MessageBox.Show("Yêu cầu nhập tên nhân viên","Thông báo");
				txtTenNV.Focus();
				return false;
			}
			if(cboPhai.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn giới tính"),lan.Change_language_MessageText("Thông báo"));
				cboPhai.Focus();
				return false;
			}			
			if(cboDanToc.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn dân tộc"),lan.Change_language_MessageText("Thông báo"));
				cboDanToc.Focus();
				return false;
			}			
			if(cboTonGiao.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn tôn giáo"),lan.Change_language_MessageText("Thông báo"));
				cboTonGiao.Focus();
				return false;
			}			
			if(txtnamsinh.Text=="" && dtpNgaySinh.Text=="")
			{
				MessageBox.Show(lan.Change_language_MessageText("Nhập ngày sinh nhân viên"),lan.Change_language_MessageText("Thông báo"));
				dtpNgaySinh.Focus();
				return false;
			}
			if(txtNguyenQuan.Text=="")
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập nguyên quán"),lan.Change_language_MessageText("Thông báo"));
				txtNguyenQuan.Focus();
				return false;
			}
			if(cboNguyenQuan.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn quốc gia"),lan.Change_language_MessageText("Thông báo"));
				cboNguyenQuan.Focus();
				return false;
			}
			if(txtNoiSinh.Text=="")
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập nơi sinh"),lan.Change_language_MessageText("Thông báo"));
				txtNoiSinh.Focus();
				return false;
			}
			if(txtDienThoai.Text!="")
			{
				if(txtDienThoai.TextLength <6 || txtDienThoai.TextLength > 15)
				{
					MessageBox.Show(lan.Change_language_MessageText("Số điện thoại không hợp lệ"),lan.Change_language_MessageText("Thông báo"));
					txtDienThoai.Focus();
					return false;
				}
			}
			if(txtThuongTru.Text=="" )
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập nơi thường trú"),lan.Change_language_MessageText("Thông báo"));
				txtThuongTru.Focus();
				return false;
			}
			if(cboTinhThuongTru.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn tỉnh thường trú"),lan.Change_language_MessageText("Thông báo"));
				cboTinhThuongTru.Focus();
				return false;
			}
			if(cboQuanThuongTru.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn quận/huyện thường trú"),lan.Change_language_MessageText("Thông báo"));
				cboQuanThuongTru.Focus();
				return false;
			}
			if(txtNoiOHN.Text=="")
			{
				MessageBox.Show(lan.Change_language_MessageText("Nhập nơi ở hiện nay"),lan.Change_language_MessageText("Thông báo"));
				txtNoiOHN.Focus();
				return false;
			}
			if(cboTinhOHN.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn tỉnh ở hiện nay"),lan.Change_language_MessageText("Thông báo"));
				cboTinhOHN.Focus();
				return false;
			}
			if(cboQuanOHN.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn quận/huyện ở hiện nay"),lan.Change_language_MessageText("Thông báo"));
				cboQuanOHN.Focus();
				return false;
			}
			if(cboChucdanh.SelectedIndex==-1)
			{
				MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn chức danh"),lan.Change_language_MessageText("Thông báo"));
				cboChucdanh.Focus();
				SendKeys.Send("{F4}");
				return false;
			}
			return true;			
		}
		private void butHuy_Click(object sender, System.EventArgs e)
		{
			DataSet ds=new DataSet();
			string ma_nv=txtMaSoNV.Text;
			DialogResult dr = MessageBox.Show(lan.Change_language_MessageText("Bạn có muốn hủy nhân viên này không"),AccessData.Msg,MessageBoxButtons.YesNo,MessageBoxIcon.Question);			
			if(dr == DialogResult.Yes) 			
			{	
				try
				{
					mDB.Execute_data("Delete  from "+mDB.user+".llnv Where mnvmay= '"+ ma_nv + "'");
                    mDB.Execute_data("Delete  from " + mDB.user + ".hopdong Where manv= '" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".thebhyt WHERE manv='" + ma_nv + "'");//tabcapso thebaohiemyte
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".congviec WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".qtdaotao WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".hphi WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".ktkl WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".giacanh WHERE manv='" + ma_nv + "'"); ;
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".xuatcanh WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".suckhoe WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".dmhscv WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".tangbc WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".dmnhiemvu WHERE manv='" + ma_nv + "'");
                    mDB.Execute_data("DELETE  FROM " + mDB.user + ".thaydoi_bluong WHERE manv='" + ma_nv + "'");
					
					MessageBox.Show(lan.Change_language_MessageText("Đã Hủy toàn bộ danh sách của nhân viên này"),AccessData.Msg);	
                    ds=mDB.f_countNV();
                    TSo=ds.Tables[0].Rows[0][0].ToString();
                    txtTSo.Text="";
                    txtTSo.Text=TSo.ToString();
					Load_Them();
					txtMaSoNV.Focus();
					load_dgrid("");
                    enable_but(true);
                    butEdit.Enabled = admin;
                    butHuy.Enabled = admin;
				}
				catch {}
			}		
		}

		 void load_LLNVTim(string v_manv)
		{
			try
			{
				txtMaSoNV.Text=v_manv;							
				
			}
			catch{}
		}
		
				
		private void butTim_Click(object sender, System.EventArgs e)
		{
            string m_manv = "";
            frmTimNhanVien f1 = new frmTimNhanVien();
            f1.ShowDialog();
            m_manv = f1.get_manv;
            if (m_manv == "")
            {
                return;
            }
            try
            {
                load_LLNVTim(f1.get_manv);
                load_LLNV();
            }
            catch { }			
		}

		private void butKetThuc_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		
		private void load_dgrid(string m_bp)
        {
            dsllnv = mDB.get_llnv(m_bp);
            dataGrid1.DataSource = dsllnv.Tables[0];
            CurrencyManager cm = (CurrencyManager)BindingContext[dataGrid1.DataSource, dataGrid1.DataMember];
            DataView dv = (DataView)cm.List;
            dv.AllowDelete = false;
            dv.AllowEdit = false;
            dv.AllowNew = false;
		}
        
		private void AddTableStype()
		{
			DataGridTableStyle ts = new DataGridTableStyle();
			ts.MappingName = dsllnv.Tables[0].TableName;
			ts.AlternatingBackColor = Color.Beige;
			ts.BackColor = Color.GhostWhite;
			ts.ForeColor = Color.MidnightBlue;
			ts.GridLineColor = Color.RoyalBlue;
			ts.HeaderBackColor = Color.MidnightBlue;
			ts.HeaderForeColor = Color.Lavender;
			ts.SelectionBackColor = Color.Teal;
			ts.SelectionForeColor = Color.PaleGreen;
			ts.RowHeaderWidth=10;
				

			DataGridTextBoxColumn TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "Manv";
			TextCol1.HeaderText = lan.Change_language_MessageText("Mã hân viên");
			TextCol1.Width = 80;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "hovaten";
			TextCol1.HeaderText = lan.Change_language_MessageText("Họ và tên");
			TextCol1.Width = 150;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);
			
			
			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "namsinh";
			TextCol1.HeaderText = lan.Change_language_MessageText("Năm sinh");
			TextCol1.Width = 80;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "phai";
			TextCol1.HeaderText = lan.Change_language_MessageText("Giới tính");
			TextCol1.Width = 80;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "chucvu";
			TextCol1.HeaderText = lan.Change_language_MessageText("Chức vụ");
			TextCol1.Width = 120;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "tenbp";
			TextCol1.HeaderText = lan.Change_language_MessageText("Khoa/Phòng");
			TextCol1.Width = 150;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			TextCol1=new DataGridTextBoxColumn();
			TextCol1.MappingName = "noio";
			TextCol1.HeaderText = lan.Change_language_MessageText("Địa chỉ");
			TextCol1.Width = 250;
			TextCol1.Alignment=HorizontalAlignment.Left;
			ts.GridColumnStyles.Add(TextCol1);
			dataGrid1.TableStyles.Add(ts);

			CurrencyManager cm = (CurrencyManager) BindingContext[dataGrid1.DataSource,dataGrid1.DataMember];
			DataView dv = (DataView) cm.List;
			dv.AllowDelete=false;
			dv.AllowEdit = false;
			dv.AllowNew=false;
		}
		
		private void Load_Chucdanh()
		{
			cboChucdanh.DisplayMember="ten";
			cboChucdanh.ValueMember="ma";
			cboChucdanh.DataSource=mDB.get_chucdanh().Tables[0];
			cboChucdanh.SelectedIndex=-1;
		}
		private void Load_Phai()
		{
			cboPhai.DisplayMember="ten";
			cboPhai.ValueMember="ten";
            cboPhai.DataSource = mDB.get_dmphai().Tables[0];			
			cboPhai.SelectedIndex=-1;
		}
		private void Load_BoPhan ()
		{
			cboBoPhan.DisplayMember="tenbp";
			cboBoPhan.ValueMember="madv";
			cboBoPhan.DataSource=mDB.get_bophan().Tables[0];
			cboBoPhan.SelectedIndex=-1;
            //ds_bophan
            DataRow rs;
            ds_bophan = mDB.get_bophan();
            rs = ds_bophan.Tables[0].NewRow();
            rs["madv"] = "";
            rs["Tenbp"] = "(All)";
            ds_bophan.Tables[0].Rows.InsertAt(rs, 0);
            cbpBP_loc.DisplayMember = "tenbp";
            cbpBP_loc.ValueMember = "madv";
            cbpBP_loc.DataSource = ds_bophan.Tables[0];
            cbpBP_loc.SelectedIndex = -1;
		}
        void Load_dmnganhang()
        {
            txtNganhang.ValueMember = "ma";
            txtNganhang.DisplayMember = "tennganhang";
            txtNganhang.DataSource = mDB.get_data("select ma,tennganhang from " + m_user + ".dmnganhang").Tables[0];
            txtNganhang.SelectedIndex = -1;
        }
		private void Load_ChucVu ()
		{
			cboChucVu.DisplayMember="diengiai";
			cboChucVu.ValueMember="macv";
            cboChucVu.DataSource = mDB.get_chucvu().Tables[0];
			cboChucVu.SelectedIndex=-1;
		}
		private void Load_HocVan()
		{
			cboHocVan.DisplayMember="tenhv";
			cboHocVan.ValueMember="mahv";
            cboHocVan.DataSource = mDB.get_hocvan().Tables[0];
			cboHocVan.SelectedIndex=-1;
		}
		private void Load_TonGiao ()
		{
			cboTonGiao.DisplayMember="tentg";
			cboTonGiao.ValueMember="matgiao";
            cboTonGiao.DataSource = mDB.get_tongiao().Tables[0];
			cboTonGiao.SelectedIndex=-1;
		}
		private void Load_QuocTich ()
		{
			cboNguyenQuan.DisplayMember="tenqg";
			cboNguyenQuan.ValueMember="maqg";
            cboNguyenQuan.DataSource = mDB.get_quocgia().Tables[0];
			cboNguyenQuan.SelectedIndex=-1;
		}
		private void Load_DanToc ()
		{		
			cboDanToc.DisplayMember="tendt";
			cboDanToc.ValueMember="madt";
            cboDanToc.DataSource = mDB.get_dantoc().Tables[0];
			cboDanToc.SelectedValue="25";
		}
		private void Load_NgoaiNgu()
		{
			cboNgoaiNgu1.DisplayMember="tennn";
			cboNgoaiNgu1.ValueMember="mann";
            cboNgoaiNgu1.DataSource = mDB.get_ngoaingu().Tables[0];
			cboNgoaiNgu1.SelectedIndex=-1;
			//nn2
			ngoaingu2.DisplayMember="tennn";
			ngoaingu2.ValueMember="mann";
            ngoaingu2.DataSource = mDB.get_ngoaingu().Tables[0];
			ngoaingu2.SelectedIndex=-1;
			//nn3
			cboNgoaingu3.DisplayMember="tennn";
			cboNgoaingu3.ValueMember="mann";
            cboNgoaingu3.DataSource = mDB.get_ngoaingu().Tables[0];
			cboNgoaingu3.SelectedIndex=-1;
			//nn4
			cboNgoaingu4.DisplayMember="tennn";
			cboNgoaingu4.ValueMember="mann";
            cboNgoaingu4.DataSource = mDB.get_ngoaingu().Tables[0];
			cboNgoaingu4.SelectedIndex=-1;
		}
		private void Load_ChuyenMon()
		{
			cboChuyenMon.DisplayMember="tenctdt";
			cboChuyenMon.ValueMember="mactdt";
            cboChuyenMon.DataSource = mDB.get_ctdaotao().Tables[0];
			cboChuyenMon.SelectedIndex=-1;
		}
		private void Load_TinhThuongTru()
		{
			cboTinhThuongTru.DisplayMember="tentt";
			cboTinhThuongTru.ValueMember="matt";
            cboTinhThuongTru.DataSource = mDB.get_tinhthanh().Tables[0];
			cboTinhThuongTru.SelectedValue=mDB.Mabv.Substring(0,3);
		}
		private void Load_huyenOHN()//Load_huyenThuongTru()
		{	cboQuanOHN.DisplayMember="tenquan";
			cboQuanOHN.ValueMember="maqu";
            cboQuanOHN.DataSource = mDB.get_quanhuyen().Tables[0];
			//cboQuanOHN.SelectedIndex =-1;
		}
		private void Load_huyenThuongTru()
		{
            cboQuanThuongTru.DataSource = mDB.get_quanhuyen().Tables[0];
			cboQuanThuongTru.ValueMember="maqu";
			cboQuanThuongTru.DisplayMember="tenquan";
		}
		private void Load_TinhOHienNay()
		{
			cboTinhOHN.DisplayMember="tentt";
			cboTinhOHN.ValueMember="matt";
            cboTinhOHN.DataSource = mDB.get_tinhthanh().Tables[0];
			cboTinhOHN.SelectedValue= mDB.Mabv.Substring(0,3);
		}
        private void Load_Chinhtri()
        {
            cboChinhtri.DisplayMember = "ten";
            cboChinhtri.ValueMember = "ten";
            cboChinhtri.DataSource = mDB.get_dmdtctri().Tables[0];
            cboChinhtri.SelectedIndex = -1;
        }

		private void butXem_Click(object sender, System.EventArgs e)
		{
			try
			{
				print(true);		
			}
			catch{}
		}

		private bool kiemtraF()
		{
			if(txtMaSoNV.Text=="")			
			{
				txtMaSoNV.Focus();
				return false;
			}
            if (mDB.get_data("select * from " + m_user + ".llnv where manv='" + txtMaSoNV.Text + "'").Tables[0].Rows.Count == 0)
            {
                MessageBox.Show(lan.Change_language_MessageText("Chưa cập nhật lý lịch nhân viên!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return false;
            }
			return true;
		}
        private void lay_mabn_vantay()
        {
            ma_vantay = "";
            if (fnhandang == null)
                fnhandang = new FrmNhanDang(ptb);
            fnhandang.ShowDialog();
            ma_vantay = fnhandang.mabn;
            if (ma_vantay.Length == 5)
            {
                txtMaSoNV.Text = ma_vantay;
                load_LLNV();
                SendKeys.Send("{Home}");
            }
            else
            {
                ma_vantay = "";
            }
        }
		private void lblCT_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmCongTac f1 = new frmCongTac(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,cboChucVu.Text, cboChucdanh.Text,admin,ten_nd);
                this.Hide();
                f1.ShowDialog();
                this.Show();
                load_ct();
			}								
			catch{}
		}

		private void lblDT_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmDaoTao f = new frmDaoTao(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text, admin, ten_nd);
                this.Hide();
                f.ShowDialog();
                this.Show();

                load_dt();
            }            
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
		}

		private void lblHD_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                try
                {
                    
                    frmHopDong f3 = new frmHopDong(txtMaSoNV.Text, txtHoNV.Text.Trim() + ' ' + txtTenNV.Text.Trim(), cboBoPhan.Text,ds,admin,ten_nd);
                    this.Hide();
                    f3.ShowDialog();
                    dtpNgayCongTac.Text = f3.get_NGAYDENCT.ToString();
                    load_hd();
       
                    this.Show();                
                }
                catch { }
                
			}
			catch{}
		}

		private void lblGC_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmGiaCanh f4 = new frmGiaCanh(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,admin,ten_nd);
                this.Hide();
                f4.ShowDialog();
                this.Show();
                load_gc();
			}
			catch{}
		}

		private void lblNN_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmNuocNgoai f5 = new frmNuocNgoai(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,admin,ten_nd);
                this.Hide();
                f5.ShowDialog();
                this.Show();
                //load_nn();
			}
			catch{}
		}

		private void lblCS_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmCapSo f6 = new frmCapSo(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,admin,ten_nd);
                this.Hide();
                f6.ShowDialog();
                this.Show();
                load_cs();
			}
			catch{}
		}

		private void lblSK_Click(object sender, System.EventArgs e)
		{
			try
			{
                if (!kiemtraF()) return;
                frmSucKhoe f7 = new frmSucKhoe(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,admin,ten_nd);
                this.Hide();
                f7.ShowDialog();
                this.Show();
                load_sk();
			}
			catch{}
		}

		private void load_ct()
		{           
            sql =  "select manv from "+m_user+".congviec where manv='" + txtMaSoNV.Text + "'";
            tmn_congtac.ForeColor = (mDB.get_data(sql).Tables[0].Rows.Count > 0) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);		
		}
		private void load_dt()
		{
            string sql = "";
            
            sql= "select mahv,mahocham,nnghiep,td_nnghiep,mann,mann1,mann2,tdnn,tdnn1,tdnn2";
            sql += " from " + m_user + ".llnv where manv='" + txtMaSoNV.Text + "'";
            DataSet ds3 = mDB.get_data(sql);
            tmn_daotao.ForeColor = (ds3.Tables[0].Rows[0]["mahv"].ToString() != "") ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
            
		}
		private void load_hd()
		{
			checkHD.Checked=mDB.LyLichNV(txtMaSoNV.Text).Tables[0].Rows.Count!=0;
			lblHD.ForeColor=(checkHD.Checked)?Color.FromArgb(255,0,0):Color.FromArgb(0,0,255);
            tmn_hopdong.ForeColor = (mDB.LyLichNV(txtMaSoNV.Text).Tables[0].Rows.Count != 0) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
		}
		private void load_gc()
		{
            //checkGC.Checked=mDB.f_giacanh_QHGD(txtMaSoNV.Text).Tables[0].Rows.Count!=0;
            //lblGC.ForeColor=(checkGC.Checked)?Color.FromArgb(255,0,0):Color.FromArgb(0,0,255);
            bool cn_gc=false;
            cn_gc = mDB.load_ttgiacanh(txtMaSoNV.Text).Tables[0].Rows.Count != 0;
            tmn_giacanh.ForeColor = (cn_gc) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
		}
		private void load_nn()
		{
            bool nn =mDB.f_dinuocngoai(txtMaSoNV.Text).Tables[0].Rows.Count!=0;
            tmn_nuocngoai.ForeColor = (nn) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
            //lblNN.ForeColor=(checkNN.Checked)?Color.FromArgb(255,0,0):Color.FromArgb(0,0,255);
		}
		private void load_cs()
		{
            bool cokhong =mDB.get_data("SELECT MANV FROM "+ m_user+".thebhyt where manv='"+txtMaSoNV.Text+"'").Tables[0].Rows.Count!=0;
            //lblCS.ForeColor=(checkCS.Checked)?Color.FromArgb(255,0,0):Color.FromArgb(0,0,255);
            tmn_capso.ForeColor = (cokhong) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
            
		}
		private void load_sk()
		{
            bool cokhong = mDB.f_suckhoe(txtMaSoNV.Text).Tables[0].Rows.Count != 0;
            tmn_suckhoe.ForeColor = (cokhong) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
		}
		private void load_dthe()
		{

            DataSet ds1 = mDB.get_data("select * from " + m_user + ".xuatthan x," + m_user + ".llnv l where x.thanhphan=l.tp_x_than and x.thanhphan=l.tp_b_than and l.manv='" + txtMaSoNV.Text + "'");
            DataSet ds2 = mDB.get_data("select * from " + m_user + ".dmnguongoc x," + m_user + ".llnv l where x.ten=l.nguongoc and l.manv='" + txtMaSoNV.Text + "'");
            DataSet ds3 = mDB.get_data("select * from " + m_user + ".dmdtctri x," + m_user + ".llnv l where x.ten=l.chinhtri and l.manv='" + txtMaSoNV.Text + "'");
			if(ds1.Tables[0].Rows.Count!=0)
			{
				checkDThe.Checked=true;
                tmn_doanthe.ForeColor = (checkDThe.Checked) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
			}
			if(ds2.Tables[0].Rows.Count!=0)
			{
				checkDThe.Checked=true;
                tmn_doanthe.ForeColor = (checkDThe.Checked) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
			}
			if(ds3.Tables[0].Rows.Count!=0)
			{
				checkDThe.Checked=true;
                tmn_doanthe.ForeColor = (checkDThe.Checked) ? Color.FromArgb(255, 0, 0) : Color.FromArgb(0, 0, 255);
			}
		}
        private void Load_TDViTinh()
        {
            vitinh.DisplayMember = "ten";
            vitinh.ValueMember = "ma";
            vitinh.DataSource = mDB.get_data("select * from " + m_user + ".tdnnth where tinhoc=true order by ma").Tables[0];
        }

		private void lblDThe_Click_1(object sender, System.EventArgs e)
		{
            if (!kiemtraF()) return;
            frmDoanThe f8 = new frmDoanThe(txtMaSoNV.Text, txtHoNV.Text + ' ' + txtTenNV.Text, cboBoPhan.Text,admin);
            this.Hide();
            f8.ShowDialog();
            this.Show();
		}

		private void txtMaBP_Validated(object sender, System.EventArgs e)
		{
			try
			{
				cboBoPhan.SelectedValue=txtMaBP.Text.Trim();
			}
			catch{}
		}

		private void txtChucVu_Validated(object sender, System.EventArgs e)
		{
			try
			{
				cboChucVu.SelectedValue=txtChucVu.Text.Trim();			
			}
			catch{}
		}

		private void cboBoPhan_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			try
			{
				txtMaBP.Text=cboBoPhan.SelectedValue.ToString();
			}
			catch{}
		}

		private void cboChucVu_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			try
			{
				txtChucVu.Text=cboChucVu.SelectedValue.ToString();
			}
			catch{}
		}

		private void txtnamsinh_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtnamsinh_Validated(object sender, System.EventArgs e)
		{
			try
			{
				int ns=int.Parse(txtnamsinh.Text);
				if(int.Parse(Convert.ToString(DateTime.Now.Year-ns))<18)
				{
					MessageBox.Show(lan.Change_language_MessageText("Chưa đủ 18 tuổi"),lan.Change_language_MessageText("Thông báo"));
					txtnamsinh.Focus();
					return;
				}
			}
			catch{}
		}

		private void txtnamsinh_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void cboChucdanh_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtTGBN_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
            if (e.KeyCode == Keys.Enter)
            {
                if (txtTGBN.Text.Trim() == "")
                {
                    txtTGBN.Text = "0";
                }
                if (txt_macc.Visible == true)
                {
                    txt_macc.Focus();
                }
                else
                {
                    SendKeys.Send("{Tab}");
                }
            }
		}

		private void cboChucdanh_KeyDown_1(object sender, System.Windows.Forms.KeyEventArgs e)
		{
            if (e.KeyCode == Keys.Enter)
            {
                if (bTheATM)
                {
                    txtSotk.Focus();
                }
                else
                {
                    butThem.Focus();
                }
            }
		}

		private void dtpNgayCapCMND_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				cboChucdanh.Focus();
				SendKeys.Send("{F4}");
			}
		}

		private void txtNgayBN_KeyDown_1(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
				SendKeys.Send("{Tab}");
		}
		private void cboTinhOHN_SelectedIndexChanged(object sender, System.EventArgs e)
		{
            //try
            //{
            //    cboQuanOHN.DataSource = mDB.get_data("select * from "+m_user+".btdquan where matt='" + cboTinhOHN.SelectedValue.ToString().Trim() + "'").Tables[0];
            //    cboQuanOHN.ValueMember = "maqu";
            //    cboQuanOHN.DisplayMember = "tenquan";
            //}
            //catch { }
		}

		
		private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
		{
			int i=0;
			if(dsllnv.Tables[0].Rows.Count>0)
			{
				i = dataGrid1.CurrentRowIndex;
				if(i<0)i=0;
				load_rong();
				Load_donghienhanh(i);
                load_LLNV();
				this.Update();
			}		
		}
		private void Load_donghienhanh(int i)
		{			
			try
			{
				txtMaSoNV.Text=dataGrid1[i,0].ToString();
				//if (barcode.Visible) barcode.Text = txtMaSoNV.Text;
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.ToString());
			}
		}

		private void txtMaSoNV_Validated(object sender, System.EventArgs e)
		{
			if (barcode.Visible) barcode.Text = txtMaSoNV.Text;
        }

        private void txtNgayBN_KeyDown(object sender, KeyEventArgs e)
        {

            if (e.KeyCode == Keys.Enter)
            {
                SendKeys.Send("{tab}");
            }            
        }

        private void dtpNgaySinh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{tab}");
        }

        private void txtNgayBN_Validated(object sender, EventArgs e)
        {
            txtNgayBN.Text = txtNgayBN.Text.Trim();
            if (txtNgayBN.Text.Trim() == "/  /")
            {
                txtHoNV.Focus();
                return;                
            }
            
            if (txtNgayBN.Text.Length == 6) txtNgayBN.Text = txtNgayBN.Text + DateTime.Now.Year.ToString();
            if (!mDB.kiemtrangayhople(txtNgayBN.Text))
            {
                MessageBox.Show(lan.Change_language_MessageText("Ngày không hợp lệ !"),AccessData.Msg,MessageBoxButtons.OK,MessageBoxIcon.Warning );
                txtNgayBN.Focus();
                return;
            }
        }

        private void tmn_hopdong_Click(object sender, EventArgs e)
        {
            lblHD_Click(null, null);
        }

        private void tmn_daotao_Click(object sender, EventArgs e)
        {
            lblDT_Click(null, null);
        }

        private void txtSotk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (!txtSotk.Text.Trim().Equals(""))
                {
                    txtNganhang.Enabled = true;
                    SendKeys.Send("{tab}");
                }
                else
                    butThem.Focus();
            }
        }

        private void txtNganhang_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                butThem.Focus();
        }

        private void butCancel_Click(object sender, EventArgs e)
        {
            enable_but(true);
            butEdit.Enabled = admin;
            butHuy.Enabled = admin;
            enable_ctl(false);
            butTruoc.PerformClick();
            butTiep.Focus();
            int m_manv;
            string s_manv = mDB.get_data(" select max(to_number(manv)) as manv from nhansu.llnv").Tables[0].Rows[0]["manv"].ToString();
            if (s_manv == "")
            {
                m_manv = 0;
            }
            else
            {
                m_manv = int.Parse(s_manv);            
            }

            sql = " ALTER SEQUENCE nhansu.max_manv";
            sql += " RESTART WITH " + m_manv;
            mDB.Execute_data(sql);
        }

        private void cbpBP_loc_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.ActiveControl == cbpBP_loc)
            {
                if (cbpBP_loc.SelectedIndex != -1)
                    load_dgrid(cbpBP_loc.SelectedValue.ToString());
            }
        }

        private void txtTimnhanh_Leave(object sender, EventArgs e)
        {
            if (txtTimnhanh.Text.Trim() == "") txtTimnhanh.Text = "Tìm nhanh";
        }

        private void txtTimnhanh_TextChanged(object sender, EventArgs e)
        {
            if (txtTimnhanh.Text.Trim().ToLower() != lan.Change_language_MessageText("tìm nhanh"))
            {
                CurrencyManager cm = (CurrencyManager)BindingContext[dataGrid1.DataSource, dataGrid1.DataMember];
                DataView dv = (DataView)cm.List;
                dv.RowFilter = "manv like '%" + txtTimnhanh.Text + "%' or hovaten like '%" + txtTimnhanh.Text + "%'";
            }
        }
        private void txtTimnhanh_MouseMove(object sender, MouseEventArgs e)
        {
            //txtTimnhanh.Text = "";
        }
        private void txtTimnhanh_Enter(object sender, EventArgs e)
        {
            txtTimnhanh.Text = "";
        }
        private void tmn_nuocngoai_Click(object sender, EventArgs e)
        {
            lblNN_Click(sender, e);
        }

        private void tmn_suckhoe_Click(object sender, EventArgs e)
        {
            lblSK_Click(sender, e);
        }

        private void txtNganhang_TextChanged(object sender, EventArgs e)
        {

        }
        //ngay 2109 cap nhap thong tin khi doi madv;
        string madv_cu = "", madv_moi = "",macv_cu="",macv_moi="",ngaybn_cu="",ngayn_moi="";
        decimal hscv_cu = 0, hscv_moi;
        int fag = 0;
        private void butEdit_Click(object sender, EventArgs e)
        {
            enable_but(false);
            enable_ctl(true);
            txtMaBP.Focus();    
            madv_cu=mDB.get_data(" select madv from "+mDB.user+".llnv where manv='"+txtMaSoNV.Text.Trim()+"' ").Tables[0].Rows[0]["madv"].ToString();
            macv_cu = cboChucVu.SelectedValue.ToString().Trim();
            hscv_cu = get_hscv(macv_cu);
            if (txtNgayBN.Text.Trim() != "/  /")
            {
                ngaybn_cu = txtNgayBN.Text.Trim();
            }            
            fag =1;
        }
        public bool thaydoi_madv()
        {
            madv_moi = cboBoPhan.SelectedValue.ToString().Trim();
            string mmyy = DateTime.Now.Month.ToString().PadLeft(2,'0') + DateTime.Now.Year.ToString().Substring(2, 2);
            if (!madv_cu.Equals(madv_moi))
            {
                return mDB.upd_madv(txtMaSoNV.Text.Trim(), madv_moi, mmyy);
            }
            return true;
        }
        public bool thaydoi_macv()
        {            
            macv_moi = cboChucVu.SelectedValue.ToString().Trim();
            hscv_moi=get_hscv(cboChucVu.SelectedValue.ToString().Trim());
            string ddmmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            if (txtNgayBN.Text.Trim() != "/  /")
            {
                ngayn_moi = txtNgayBN.Text.Trim();
            }
            if(!macv_moi.Equals(macv_cu))
            {
                return mDB.update_vuotkhung(txtMaSoNV.Text.Trim(),ddmmyy,"cv",hscv_cu,ngaybn_cu,hscv_moi,ngayn_moi,DateTime.Now.ToString("dd/MM/yyyy"),madv_moi,macv_cu);
            }
            return true;
        }
        private void txtTGBN_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((e.KeyChar < '0' || e.KeyChar > '9') && e.KeyChar != '\b')
                e.KeyChar = '\0';
        }

        private void txt_masothue_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_masothue_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar < '0' || e.KeyChar > '9' && e.KeyChar != '\b')
                e.KeyChar = '\0';
        }

        private void txtipmay_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((e.KeyChar < '0' || e.KeyChar > '9') & e.KeyChar != '.' && e.KeyChar != '\b')
                e.KeyChar = '\0';
        }

        private void frmLyLichNV_Load(object sender, EventArgs e)
        {
            s_mmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            Application.DoEvents();
            m_user = mDB.user;            
            bVantay = mDB.bVantay(s_mmyy);
            //bBarcode = mDB.bMavach;
            //if (mDB.bMavach)
            //{
            //    barcode.Visible = true;
            //    barcode.Text = "00001";
            //}
            //else barcode.Visible = false;
            if (mDB.nhap_macc().Trim() == "1")
            {
                lbl_macc.Visible = true;
                txt_macc.Visible = true;
            }            
            bTheATM = mDB.bTheATM();           
            if (bVantay)
            {
                ptb.Visible = true;
                lblvantay.Visible = true;
                finger.Visible = true;
            }
            ngayht = DateTime.Now.Date.ToString("dd/MM/yyyy");
            try
            {
                Load_BoPhan();
                Load_ChucVu();
                Load_HocVan();
                Load_TonGiao();
                Load_QuocTich();
                Load_DanToc();
                Load_NgoaiNgu();
                Load_ChuyenMon();
                Load_TinhThuongTru();
                Load_TinhOHienNay();
                Load_huyenOHN();
                Load_huyenThuongTru();
                Load_Phai();
                Load_Chucdanh();
                Load_TDViTinh();
                Load_TDQLNN();
                Load_dmnganhang();
                Load_Chinhtri();
                load_LLNV();
                Application.DoEvents();
                load_dgrid("");
                int i = 0;
                if (dsllnv.Tables[0].Rows.Count > 0)
                {
                    tabllnv.TabPages[1].Show();
                    i = dataGrid1.CurrentRowIndex;
                    if (i < 0) i = 1;
                    load_rong();
                    Load_donghienhanh(i);
                    load_LLNV();
                    dataGrid1.Update();
                    this.Update();
                    butTruoc.PerformClick();
                }
                tongso();
                AddTableStype();
                enable_but(true);
                butEdit.Enabled = admin;
                butHuy.Enabled = admin;
            }
            catch { }        
        }
        
        private void frmLyLichNV_KeyDown(object sender, KeyEventArgs e)
        {
            if(e.KeyCode==Keys.F12)
            {
                if (bVantay) lay_mabn_vantay();
            }
            if(e.Alt &&e.KeyCode==Keys.R)
            {
                butTruoc_Click(null,null);
            }
            if (e.Alt && e.KeyCode == Keys.N)
            {
                butSau_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.T)
            {
                butTiep_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.S)
            {
                butEdit_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.H)
            {
                butHuy_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.L)
            {
                butThem_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.B)
            {
                butCancel_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.I)
            {
                butTim_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.X)
            {
                butXem_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.K)
            {
                butKetThuc_Click(null, null);
            }
        }

        private void tabllnv_Click(object sender, EventArgs e)
        {
            if (tabllnv.SelectedTab == tabPage2)
            {
                load_dgrid("");
            }          
        }

        private void txt_macc_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                txtHoNV.Focus();
            }
        }        
	}
}
